We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
By default the main chunk size for production is:
main.js 1.12 MiB 0 [emitted] [big] main
This seemes to be caused by using the require function to import the icons:
library.add( require('@fortawesome/free-solid-svg-icons').faEnvelope, ... )
still imports the entirety of @fortawesome/free-solid-svg-icons in the chunk it seems.
Just changing the code to the following (as documented by vue-fontawesome) results in a dramatic reduction:
import { faEnvelope, faHeart, faGraduationCap, faHome, faInfo, faList, faSpinner } from '@fortawesome/free-solid-svg-icons' import { faFontAwesome, faMicrosoft, faVuejs } from '@fortawesome/free-brands-svg-icons' library.add(faEnvelope, faHeart, faGraduationCap, faHome, faInfo, faList, faSpinner, faFontAwesome, faMicrosoft, faVuejs)
main.js 81.5 KiB 0 [emitted] main
The text was updated successfully, but these errors were encountered:
Fantastic find I should of fixed this LONG ago :)
Thanks for pointing it out!!
Pushing up an update with this to the repo & Nuget.
Sorry, something went wrong.
634dcdf
Published on Nuget as 1.0.9 now - thanks again! ✨
No branches or pull requests
By default the main chunk size for production is:
main.js 1.12 MiB 0 [emitted] [big] main
This seemes to be caused by using the require function to import the icons:
library.add(
require('@fortawesome/free-solid-svg-icons').faEnvelope,
...
)
still imports the entirety of @fortawesome/free-solid-svg-icons in the chunk it seems.
Just changing the code to the following (as documented by vue-fontawesome) results in a dramatic reduction:
import { faEnvelope, faHeart, faGraduationCap, faHome, faInfo, faList, faSpinner } from '@fortawesome/free-solid-svg-icons'
import { faFontAwesome, faMicrosoft, faVuejs } from '@fortawesome/free-brands-svg-icons'
library.add(faEnvelope, faHeart, faGraduationCap, faHome, faInfo, faList, faSpinner, faFontAwesome, faMicrosoft, faVuejs)
main.js 81.5 KiB 0 [emitted] main
The text was updated successfully, but these errors were encountered: