You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removing @charset rule (hence the warnings) will fix the issue (minify is instant).
Note: this rule is injected by postcss during vite css bundling, it's not like I'm trying to break esbuild on purpose 🙈
Version
Tested against 0.14.5
Fun fact, I tried to reproduce in stackblitz (esbuild-wasm@0.13.8) and it generates a single warning (not 5000), hence no issue, but running esbuild@0.13.8 on node still exhibits above/bad behavior 🤷
The text was updated successfully, but these errors were encountered:
Thanks @evanw I confirm it fixes the build issue I had on vite !
There still seem to be a perf issue related to the number of warnings (as in exponential), which you can trigger on different (repeatable) warnings (e.g. I reproduced with json loader duplicate key warning), but I can't tell if it's worth fixing or not, lmk if you want more details.
( Initially spotted in vitejs/vite#5833 vitejs/vite#5597 )
@charset
rule which is not the first statement, it'll generate 1 warning per rule before that one (which can be a lot).Combining these 2 makes css minification extremely slow when there's such a case.
Reproduction:
Generate a file like:
And run it through esbuild css minifier (takes 5min+ on my laptop):
Charting this:
Workaround
Removing
@charset
rule (hence the warnings) will fix the issue (minify is instant).Note: this rule is injected by postcss during vite css bundling, it's not like I'm trying to break esbuild on purpose 🙈
Version
Tested against
0.14.5
Fun fact, I tried to reproduce in stackblitz (
esbuild-wasm@0.13.8
) and it generates a single warning (not 5000), hence no issue, but runningesbuild@0.13.8
on node still exhibits above/bad behavior 🤷The text was updated successfully, but these errors were encountered: