-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
Bug: Individual icons are not available as es module .mjs files #20218
Comments
Hi @emattias what do you mean by it's too large? Is a tool refusing to process it? |
I think that this is somehow related to import maps https://github.com/WICG/import-maps So no tools, just the "modern" browser feature to dynamically load only what is needed in pure javascript |
No we just dont want to load 2mb to show one icon that is just a few kb :) Its not a technical limit just performance. |
@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 |
I got it working using to-esm to convert them and then just doing |
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: