uilibrary / matx-react

Matx -Free and open-source React Material UI Admin Dashboard Template
https://ui-lib.com/downloads/matx-react-dashboard
MIT License
925 stars 389 forks source link

Taking too long to compile during refresh #9

Closed pinchez254 closed 4 years ago

pinchez254 commented 4 years ago

The app is taking too long to compile during refresh in development when you hit save after making changes... Sometimes even freezing the whole computer and you are forced to force shut. I tried disabling JavaScript source maps but still freezing the computer after a couple of continuous saves.

pinchez254 commented 4 years ago

Closing this, The issue was about When and how to use tree-shaking in Material-UI. Development bundles can contain the full library which can lead to slower startup times. This is especially noticeable if you import from @material-ui/icons. Startup times can be approximately 6x slower than without named imports from the top-level API. The fix was to avoid path imports and use top level imports. I think this should be included in the readme file to help anyone new with material UI because you have already done the basic configs to use Top level imports. Read more https://material-ui.com/guides/minimizing-bundle-size/#minimizing-bundle-size