framework icon indicating copy to clipboard operation
framework copied to clipboard

fix(nuxt): don't disable scripts in dev mode

Open danielroe opened this issue 3 years ago • 4 comments

🔗 Linked issue

resolves #7737

❓ Type of change

  • [ ] 📖 Documentation (updates to the documentation or readme)
  • [x] 🐞 Bug fix (a non-breaking change that fixes an issue)
  • [ ] 👌 Enhancement (improving an existing functionality like performance)
  • [ ] ✨ New feature (a non-breaking change that adds functionality)
  • [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

We should only respect experimental.noScripts in built mode.

📝 Checklist

  • [x] I have linked an issue or discussion.
  • [ ] I have updated the documentation accordingly.

danielroe avatar Sep 22 '22 08:09 danielroe

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

codesandbox[bot] avatar Sep 22 '22 08:09 codesandbox[bot]

Deploy Preview for nuxt3-docs ready!

Name Link
Latest commit 57c7382e9d3a54f9bad071a2af59f00361a3b51f
Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/632c17e8f3a2610008869926
Deploy Preview https://deploy-preview-7745--nuxt3-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Sep 22 '22 08:09 netlify[bot]

Doesn't it make sense to have consistent behavior between dev and prod for disabling scripts?

pi0 avatar Sep 22 '22 13:09 pi0

We are testing for dev here:

https://github.com/nuxt/framework/blob/5605f1ce18d152122d966ac37c35c4c434b16184/packages/nuxt/src/core/nuxt.ts#L95

I think HMR for dev, but no scripts for built site seems a better default, but happy to be convinced otherwise.

danielroe avatar Sep 22 '22 14:09 danielroe