You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to implement an SVG Icon Library for my site. The goal is to allow the content editors use the name of the icon in the CMS, and then the site renders the correct icon in an SVG format that allows it to be styled with CSS. (Inline SVG or a SVG use with sprite).
I've been struggling with this for several days now. Does anyone have any suggestions for this?
I have gotten dynamic imports working in development mode, but they don't work in the final production build because the files are optimized out of the bundles.
What would be a good way to detect which icons are being used and have them included in the final bundle?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to implement an SVG Icon Library for my site. The goal is to allow the content editors use the name of the icon in the CMS, and then the site renders the correct icon in an SVG format that allows it to be styled with CSS. (Inline SVG or a SVG use with sprite).
I've been struggling with this for several days now. Does anyone have any suggestions for this?
I have gotten dynamic imports working in development mode, but they don't work in the final production build because the files are optimized out of the bundles.
What would be a good way to detect which icons are being used and have them included in the final bundle?
Beta Was this translation helpful? Give feedback.
All reactions