-
Notifications
You must be signed in to change notification settings - Fork 133
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
Huge js file generated when used with nuxt3 in ssr mode #342
Comments
https://zerobin.net/?0eda2a5b3b30b534#Rv0QZyVP5OcmSDtjzkTqyJPih4D2o7nv5JH9qZc7SEs= here is the js file that is generated and the link i got it from https://3ehro.sse.codesandbox.io/_nuxt/ec0f4ba.js Do note that the generated js file is 1.4mb in size |
How did you use it with nuxt3? Is the .component() method available in the nuxtApp.vueApp? |
Well in the reproduction, I created a plugin that registers the fontawesome component as Fa |
I'm having the same issue when using version 2.14.6`. The example is the same way I use font awesome in my project, and the entry point is 1.11mb. |
I just recommend using https://github.com/antfu/unplugin-icons for a more modern experience. |
Importing each icon individually should resolve the issue.
|
Describe 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):
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.
The text was updated successfully, but these errors were encountered: