-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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(build): vendor chunk strategy uses static imports, fix #2672 #2934
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm that my production project works with this fix and run super smoothly 🎉
Tested with yarn link "vite"
@fi3ework Could you update / rebase onto the latest |
@Shinigami92 hi, I just rebased the branch and all tests flow passed except Appveyor. Seems like the queue blocked. Can we remove Appveyor in the future? It runs really slow. 😅 |
Yeah, in some weeks we potentially will remove AppVeyor and CircleCI |
Thanks a lot for this PR @fi3ework, this is an important fix |
…2672)
Description
Fixes #2672.
Vite put module which is in node_modules and not imported by any dynamic import recursively to the
vendor
chunk. But in #2672,node_modules/prismjs/components/prism-json.js
is used in the initial chunk and also imported by dynamic import. So a runtime error threw when it used in the initial chunk.Maybe we should put modules which in node_modules and statically imported by any entry module recursively to the
vendor
chunk.The diff of modules moved to
chunk
vendor (✅ - moved, ❌ - not moved)before:
after:
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).