vue icon indicating copy to clipboard operation
vue copied to clipboard

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

Open domin-mnd opened this issue 2 years ago • 4 comments

🐛 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

domin-mnd avatar Oct 07 '23 16:10 domin-mnd

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

vedmant avatar Feb 29 '24 08:02 vedmant

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

mikehwagz avatar Jun 07 '24 13:06 mikehwagz

I ended up importing icons like this:

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

vedmant avatar Jun 26 '24 10:06 vedmant

Having same issue, build time increased insanley.

minarc avatar Apr 01 '25 17:04 minarc