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
Tree shaking #2
Comments
I get it! Thank you for your feedback. I need some time to fix this issue, and if you are interested, you can also try how to fix it. |
@kevinpastor I don't know why the use-client plugin broke the tree shaking, but I found a another way to fix it.
If you used |
This ended up being the solution to my problem. It seems like @mui/material latest update adds the "use-client" directive to all of its components. I'll be updating my project to that version making the use of your plugin unnecessary for me. I think you should advertise your plugin in a broader way because at first sight it seems like it's only useful for @mui. Great good though and thanks for the support! |
This is an excepted behavior of next.js, see here vercel/next.js#52679 (comment) |
Is it possible that this plugin remove the possibility to do proper tree shaking on dependency?
After using
@next/bundle-analyzer
to analyze the output bundle of the build, it seems like@mui/material
is completly bundled in a chunk even though I'm only using parts of it.The text was updated successfully, but these errors were encountered: