From a83ea8206adffe8741702c93b63201f0f01e5ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Wed, 19 Oct 2022 10:08:49 +0200 Subject: [PATCH] fix: async script ran twice --- playground/nuxt.config.ts | 8 +++++++- playground/public/script.js | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 playground/public/script.js diff --git a/playground/nuxt.config.ts b/playground/nuxt.config.ts index 896312f044e..cf323728630 100644 --- a/playground/nuxt.config.ts +++ b/playground/nuxt.config.ts @@ -1,3 +1,9 @@ export default defineNuxtConfig({ - + app: { + head: { + script: [ + { src: '/script.js', async: true } + ] + } + } }) diff --git a/playground/public/script.js b/playground/public/script.js new file mode 100644 index 00000000000..f7f93a0fc0e --- /dev/null +++ b/playground/public/script.js @@ -0,0 +1 @@ +console.log('Hello script')