nuxt / scripts

Third-Party Scripts Meets Nuxt Developer Experience.
https://scripts.nuxt.com
MIT License
328 stars 45 forks source link

ScriptYouTubePlayer: script doesn't load if you navigate from a page with a script to another page with a script without triggering the previous one #265

Closed ahmedrangel closed 2 months ago

ahmedrangel commented 2 months ago

🐛 The bug

  1. Start the stackblitz reproduction
  2. You must be on the index page /
  3. DO NOT click the video in index
  4. Click Go to Page
  5. Try to play the video clicking it
  6. See that the script won't load the video

Btw, after following these steps, if you back to index and then back again to /page the script will load automatically without clicking it.

🛠ī¸ To reproduce

https://stackblitz.com/edit/nuxt-starter-hulk8u

🌈 Expected behavior

The script in /page should be loaded after following these steps

ℹī¸ Additional context

nuxt: 3.13.1 @nuxt/scripts: 0.9.0

harlan-zw commented 2 months ago

Thanks for the reproduction, this is fixed in 0.9.1. See https://stackblitz.com/edit/nuxt-starter-yg8kfy?file=pages%2Fpage.vue

ahmedrangel commented 2 months ago

Thanks for the reproduction, this is fixed in 0.9.1. See https://stackblitz.com/edit/nuxt-starter-yg8kfy?file=pages%2Fpage.vue

Thank you for the fix! It's working now