-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Nodes: Mark as effectful for Webpack. #27189
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
Thanks for the fix! I was running into issues with my vite build due to this. |
Out of curiosity, was it even intentional that #26881 now requires these additional steps? I can't see a mention of it in the original PR so can only assume that was by accident. I think it would be better if there's no additional configuration needed. |
Seems vite ignores both |
I'm pretty sure Nodes became effectful since at least the introduction of node chaining (I've explicitly noted that tree-shaking wouldn't work now in #25526). I've also suggested a possible workaround in that issue. |
Fixes: #27076
Description
Configures
sideEffects
to excludethree/nodes
from coarse module skipping prior to tree-shaking. Since #26881, Nodes are effectful and cannot be individually tree-shaken.