Closed unional closed 1 year ago
Interesting to know about esbuild-visualizer
.
However, I will not have time for this feature. Can I ask you to make a PR adding new @size-limit/esbuild-why
package using esbuild-visualizer
?
I can take a look when I get a chance.
Hi @ai , I'm also done with it. One thing is that esbuild-visualizer
seems to only output a html result.
That means we have to save it somewhere.
webpack-why
have a saveBundle
option. Is there a sensible default for that? Or esbuild
usage would require both why
and saveBundle
to be defined?
FYI I have a private project that esbuild size returns 116 kb while webpack return 22 kb. I wonder why there is such a big different. First guess is that esbuild one didn't do tree shaking on the dependencies.
Seems like there is some problem.
pnpm add -D @size-limit/preset-small-lib
ERR_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE In : No matching version found for @size-limit/esbuild@8.2.0 inside the workspace
```
The version strings are not updated during publish:
https://www.npmjs.com/package/@size-limit/preset-small-lib?activeTab=explore
Maybe they should be `workspace:^` or even `workspace:*`?
Nope, the problem is with npm. When I started to release a small 8.2.1 fix, they block releasing some packages.
Install 8.2.0 for every package.
I will try to release 8.2.1 again later.
I released the fix in 8.2.2.
The 8.2.2 still have the same problem.
Seems like when you run pnpm bump
, the preset-app
, preset-big-lib
, and preset-small-lib
dependencies fields didn't get updated somehow.
I run it locally here is it seems to be working:
The 8.2.2 still have the same problem.
What exactly problem do you have?
What exactly problem do you have?
Unable to install @size-limit/preset-small-lib
pnpm add -D @size-limit/preset-small-lib
ERR_PNPM_NO_MATCHING_VERSION_INSIDE_WORKSPACE In : No matching version found for @size-limit/esbuild@8.2.2 inside the workspace
Because the version string workspace:8.2.2
is invalid. It should be 8.2.2
btw, I use changsets in my libraries to manage releases. It works well with pnpm
and monorepo. 🍻
Unable to install @size-limit/preset-small-lib
Did you update size-limit
and @size-limit/esbuild
to 8.2.2
?
Because the version string workspace:8.2.2 is invalid. It should be 8.2.2
We have workspace:8.2.2
only in devDependencies
(which we remove on release). peerDependencies
uses 8.2.2
.
We have workspace:8.2.2 only in devDependencies (which we remove on release). peerDependencies uses 8.2.2.
It's not. See the screenshot above. preset-*
is dependencies
and somehow not updated
The @size-limit/preset-small-lib
uses @size-limit/esbuild
as dependencies, so no need to install it explicitly.
Got it. Try 8.2.3
.
Working now 🎉
Currently it does not:
Maybe it is possible now?
https://github.com/evanw/esbuild/issues/15 https://www.npmjs.com/package/esbuild-visualizer
Want to see how to make them work with
size-limit