Performance Issues with MUI Modules and Potential Tree Shaking Problem in Next.js
Unanswered
Abyssinian posted this in #help-forum
AbyssinianOP
Hey everyone! 🙌
I'm encountering an issue with my Next.js project where I'm loading quite a few modules, and it's affecting both my development and production performance. I've noticed that a significant portion of the problem might be stemming from MUI. More generally, it appears that tree shaking might not be working as expected.
All the imports are modularized : I make sure I don't do
only
+ just to be sure, Modularize imports is enabled in next.config.js (see the picture)
side effects are set on false in package.json
Has anyone else experienced this or have any suggestions on how to address this?
Thanks in advance for the help!
I'm encountering an issue with my Next.js project where I'm loading quite a few modules, and it's affecting both my development and production performance. I've noticed that a significant portion of the problem might be stemming from MUI. More generally, it appears that tree shaking might not be working as expected.
All the imports are modularized : I make sure I don't do
import {Icon} from "@mui/icons-materialonly
import Icon from "@mui/icons-material/Icon+ just to be sure, Modularize imports is enabled in next.config.js (see the picture)
side effects are set on false in package.json
Has anyone else experienced this or have any suggestions on how to address this?
Thanks in advance for the help!