icon
icon copied to clipboard
Reduce Iconify Package Size in NuxtUI – Import Only Needed Icons
Hello,
I'm using NuxtUI with Iconify and four collections: Material Symbols, Heroicons, let's icon and Simple Icons.
However, after installing these collections and building my project, the generated packages are several megabytes in size. These packages take up about 80% of my project size, which heavily impacts performance.
total size of my project :
I’d like to:
Import only the specific icons I use from these collections instead of including everything. Know if there’s a built-in way to achieve this in Iconify/nuxt-icon or any recommended approach.
I am having the same issue without Nuxt UI. I included only 3 icons from solar, but it adds 6MB to the bundle.
+1, I just installing the fluent-emoji iconify set and my build started to fail due to out of memory issues. Adding node-options=--max-old-space-size=16384 to .npmrc allowed things to build again, but the prerender step took about 4 minutes and the package size was over 30 mb.
just stumbled up on the same problem!
It may be that your server bundling mode is local. As pointed by the documentation, maybe you can consider changing the server bundling mode to remote or externalizing the icons JSON.