Open muuvmuuv opened 2 years ago
Came here with the same issue. Anyone know any fix?
We use ViteJS
with esbuild
which should minify by default.
I believe it is coming from this piece of code: https://github.com/FortAwesome/Font-Awesome/blob/6.x/js-packages/%40fortawesome/fontawesome-svg-core/index.js#L615
Can you try to opt out from automatic css and import it normally?
https://fontawesome.com/v6/docs/apis/javascript/configuration#contentHeader
autoAddCss
Hi @tagliala thanks for the tip but sadly that didn't exclude the CSS from the compiled JS.
@mlwilkerson any chance to take a look here?
Bug description
Just discovered while serving everything fa related in a different Vite bundle, that fa contains unminified CSS. I guess its coming from SVG-Core and https://github.com/FortAwesome/Font-Awesome/blob/d3a7818c253fcbafff9ebd1d4abb2866c192e1d7/js-packages/%40fortawesome/fontawesome-svg-core/styles.css.
Reproducible test case
https://replit.com/@muuvmuuv/Vite-Font-Awesome#dist/assets/index.0ba6325b.js
Screenshots
Font Awesome version
^6
Serving
Self-hosted
Implementation
SVG+JS
Browser and Operating System
All
Web bug report checklist