Huge js file generated when used with nuxt3 in ssr mode
See original GitHub issueDescribe the bug An unminified inlinded css as a js template string is added to built files when using vue-fontawesome with nuxt3.
Reproducible test case https://codesandbox.io/s/compassionate-leavitt-3ehro?file=/plugins/fontawesome.ts Here is a repro of this issue. Simple open the preview window in a new window then check the js files generated in the dev console (in sources/debugger tab). This has been a major hurdle in me getting a decent lighthouse score.
Expected behavior
With config.autoAddCss = false
no css should exist in the build files.
Desktop (please complete the following information):
- Browser : all
- Version: “@fortawesome/vue-fontawesome”: “3.0.0-5”
Additional context I have followed the instructions for nuxt, but that doesnt seem to fix it. Additionally, webpack 5 is being used as the bundler in nuxt3.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Well in the reproduction, I created a plugin that registers the fontawesome component as Fa
Importing each icon individually should resolve the issue.
import { faUser } from '@fortawesome/free-solid-svg-icons/faUser'