Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not optimise module code #662

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

danielroe
Copy link
Contributor

@danielroe danielroe commented Nov 22, 2023

nuxt/nuxt#24387
resolves #660

When vite optimises code, it will crawl that code in a runtime context. But Nuxt modules are always meant to be run in a module context. By removing this we speed up the start of Nuxt for users using storyblok, and also avoid errors caused by trying to resolve Nuxt module imports outside of a Node context.

@michaelpumo
Copy link

Nice one Daniel, this looks to work for me in my own testing (directly via Node modules). Hopefully it can get through soon as it breaks latest Nuxt. ☺️

@Dawntraoz
Copy link
Contributor

Thank you, @danielroe, as always, for giving us a hand! 💜

Copy link
Contributor

🎉 This PR is included in version 5.7.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants