phosphor-icons / vue

A flexible icon family for Vue
https://phosphoricons.com
MIT License
199 stars 20 forks source link

`@phosphor-icons/vue/compact` significantly increases the build time #39

Open domin-mnd opened 1 year ago

domin-mnd commented 1 year ago

🐛 The bug

Compact bundle significantly increases the build time. That being said, the import cost for the bundle is 3.8M:

Import cost

As mentioned in v2.1.4 changelog compact scope bundles all files in a single file aiming to fix the EMFILE error.

Is there any other way of avoiding Error: EMFILE: too many open files... error as in #35 besides using compact scope?

🛠ī¸ To reproduce

Build screenshot

🌈 Expected behaviour

A proposed solution would be exporting per-file icons as in:

import PhHouse from "@phosphor-icons/vue/icons/PhHouse.vue"

ℹī¸ Additional context

No response

vedmant commented 8 months ago

+1 I have the same issue, having something like import PhHouse from "@phosphor-icons/vue/icons/PhHouse.vue" will be the best solution

mikehwagz commented 5 months ago

I am also seeing longer build times after moving to the compact build in an attempt to avoid Error: EMFILE: too many open files... from https://github.com/phosphor-icons/vue/issues/35

Builds for this project on vercel went from around 1 minute, to over 7 minutes:

image
vedmant commented 4 months ago

I ended up importing icons like this:

import PhList from '~/node_modules/@phosphor-icons/vue/dist/icons/PhList.vue'