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
We cant know which icons are used at build time and we dont want to load all icons so we want to be able to import individual icons with dynamic import in browsers (to get caching) but only the index.mjs is available as an esm mjs file. Its too large (2mb:ish).
Please make the individual icon definition files (like this one) available as .mjs files also.
Font Awesome version
v6.5.2
Serving
Self-hosted
Implementation
SVG+JS
Browser and Operating System
All browsers that support dynamic import
Web bug report checklist
I have included a test case because my odds go way up that the team can fix this when I do
@emattias I see! We'll have to think more about this loading mode. Up until this point we haven't entered the world of import maps and loading ESM modules directly in the browser with <script type="module">.
I got it working using to-esm to convert them and then just doing import('http://foo.com/path/to/file.mjs') in the browser and then adding the icon definition with library.add()
Bug description
We cant know which icons are used at build time and we dont want to load all icons so we want to be able to import individual icons with dynamic import in browsers (to get caching) but only the index.mjs is available as an esm mjs file. Its too large (2mb:ish).
Please make the individual icon definition files (like this one) available as .mjs files also.
Font Awesome version
v6.5.2
Serving
Self-hosted
Implementation
SVG+JS
Browser and Operating System
Web bug report checklist
The text was updated successfully, but these errors were encountered: