Closed just-boris closed 6 months ago
Should we suggest using webpack or there is a simple way to fix esbuild?
Found a simple way: https://github.com/ai/size-limit/pull/361
The fix was released in 11.1.2.
Thanks, got the expected numbers now.
I think the issue is a big one. All people using @size-limit/preset-small-lib
with CSS files are affected and have inaccurate numbers.
How about sending a PSA to the users?
What is PSA in this context?
Public service announcement. Something like this: https://twitter.com/justboriss/status/1771153391072292969
I retweeted your tweet :)
If a project contains a CSS file in imports, for example
import "./styles.css";
, size-limit with esbuild plugin only counts CSS size and skips Javascript. The same works well on webpack + webpack-css plugin.Reproducible in this sample project: https://github.com/just-boris/size-limit-demos
The same entry produces different results when using esbuild and webpack plugins