-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Using icon libraries cause massive increases to build time #12793
Comments
I'm hitting this too - seems to be the fault of a new Astro version. I'm still trying to identify which version introduced the slowness. EDIT: It seems to happen as soon as you go from Astro v4 to Astro v5. |
It happens in v4 as well, but the build time inflation is still sub second, so at least tolerable. My personal projects still suffer an intolerable build time bloat though |
I thought we fixed that, but maybe this is another issue. Thank you for reporting |
Is this something easily worked around with some vite config changes? Or is this something inherent to Astro? |
For dev, since For build, it seems like Rollup will transform all files in the library before taking into account of As a workaround, the library needs to export the icons individually and be imported individually, which understandably isn't a very good solution. Or when Vite & rolldown lands. Otherwise personally I use unocss icons. |
But seems weird that the build size has suddenly ballooned just from upgrading Astro. |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Using icon libraries* increases build times by factors of seconds. The worst culprit being a
3,166,940%
increase on page reloads in dev modetime
score)1.57s
5.2 ms
12.81s
16,4686 ms
I've also raised this issue in 2 icon libraries:
* and probably other types of libs, but I've not tested any others
** User hand refreshed consecutively
What's the expected result?
For the build command, I'm less concerned
For the dev command and single page refreshes, I expect the load time to be sub second, not tens of seconds like the repro and other projects
Link to Minimal Reproducible Example
https://github.com/oy3-archive/astro-dep-perf
Participation
The text was updated successfully, but these errors were encountered: