Replies: 1 comment
-
Tree shaking usually depends on the module bundler you are using. Each of these has its own specific configuration for enabling and optimizing tree shaking. Make sure your configuration settings allow for tree shaking, especially if you're using Webpack - you need to be in production mode (mode: "production"). Also, sometimes if you import something from a module and that something has dependencies within the module, the entire module may be included even if you are only using a part of it. This depends on how the library is structured and written. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I pulled the Onu project from GitHub and removed all other components from the example folder, leaving only one OButton. I found unused Onu components that were also included in the compiled file.
It's strange that I noticed the
"sideEffects": false
setting in the packages/components/package.json file, but Tree Shaking doesn't seem to work in actual usage.Beta Was this translation helpful? Give feedback.
All reactions