-
Notifications
You must be signed in to change notification settings - Fork 472
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
perf(core): use prebundle to reduce dependencies #6462
Conversation
✅ Deploy Preview for rspack canceled.
|
!canary |
How is this better? Now I have duplicate code in my node modules, ehhh |
Bundle dependency is a very practical optimization method, and we can see that projects like Next.js and Vite have adopted it.
There are many benefits of bundle dependencies, including faster installation and prevention of supply chain attacks caused by updating indirect dependencies. Regarding your concerns, while there may be duplicate code in node_modules, in most cases the code you need to download is less than before, because the bundling process removes unnecessary files. |
According to my calculations, this PR has reduced the install size by 800kB, and we can further optimize it. |
Summary
Use prebundle to reduce dependencies of
@rspack/core
(12 deps -> 6 deps)How it works:
compiled
folder.compiled
folder.resolve #5097
Checklist