-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
icon-builder: build indexes for icons #1064
Comments
@hai-cea / @jkruder I am not up to speed with how Is it true that adding an Is there anything that node / webpack / browserify does to optimize / allow lazy-evaluation of I believe the idea of |
@tony The let NavigationIcons = require('[relative path to node_modules]/node_modules/material-ui/lib/svg-icons/navigation/');
let { ArrowDown, ArrowUp } = NavigationIcons; In this scenario only the Navigation icons have been pulled in. This is really only useful for folks who are consuming MUI. Internally we will still explicitly reference the icons we need so as not to pull in a large portion of the svg-icons. In regards to how require's work, there are no dynamic requires using browserify (which this framework uses). So if there are 100 requires in an index, all 100 will be brought in regardless of how many are actually used. |
Resolved by #1959 |
#1057 (comment)
Will have a PR this week for this. It will work for material-ui and user generated svg's.
The text was updated successfully, but these errors were encountered: