-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
fix: inline icons from @mui/icons-material
#147
Conversation
✅ Deploy Preview for any-viewer ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Thanks for the PR 👍 -import { Check as CheckIcon } from '@mui/icons-material'
+import CheckIcon from '@mui/icons-material/Check' |
@mui/icons-material
dependency
As alternative, create a single Icons file to include all icons? |
Codecov ReportBase: 87.92% // Head: 87.78% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #147 +/- ##
==========================================
- Coverage 87.92% 87.78% -0.14%
==========================================
Files 18 18
Lines 1904 1940 +36
Branches 339 345 +6
==========================================
+ Hits 1674 1703 +29
- Misses 230 237 +7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
I just checked the bundle size of this PR, but it didn't bring down the total size 😢 |
Anyway this PR removes 1 dependency, can be merged |
b276acd
to
79be0ef
Compare
@pionxzh rebased |
I was analyzing why so many modules are being used for my next.js dev build, and it pointed to the fact that json-viewer uses icons-material. Could we give this a merge? That would be great! |
Let's ship this. Thanks for your work @rtritto |
@mui/icons-material
dependency@mui/icons-material
@anthonyalayo May I know your setup? bundler and the config. |
Hey @pionxzh, thanks for the release! I took a while on the response as I was double checking all the numbers. I'm playing with a next.js boilerplate with version 13.1.2. Here's what the compile output looks like with:
Notice the extremely large modules count and long build time (its basically an empty project). As you can see, there was a ton of hits from Here's what the compile output looks like with:
Much better! I can see that the 10K+ With that being said, the dependency on Fixing that would probably take the module count down to something reasonable. MUI has a page dedicated to techniques ensuring it doesn't bloat builds. |
@anthonyalayo You are right. I just checked the output and yes it didn't get transformed properly. |
* Remove @mui/icons-material * Merge all icons to Icons file
Changes:
Remove
@mui/icons-material
dependencyCreate Icons with svg
Related #140