-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Description
Describe the bug
Using useScriptTag with <script type="module"> doesn't work. The script will only execute (run its side effects) on first load, but it won't re-execute the second time.
This is perhaps not a bug in the technical sense but rather lack of specific workarounds (e.g. adding ?v=<random> to the URL fixes the problem, albeit being very suboptimal), but from user's point of view it's simply not working.
Reproduction
https://stackblitz.com/edit/nuxt-starter-cbmqng
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.18.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.15.3 - /usr/local/bin/pnpm
npmPackages:
@vueuse/core: ^10.9.0 => 10.9.0
vue: ^3.4.21 => 3.4.21Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
No labels