Could a `metafile` option be added to
Could a
metafile
option be added to wrangler deploy to expose esbuild's metafile? I see that wrangler uses it internally, but it isn't exposed anywhere so you can't use standard tools to do bundle size analysis6 Replies
That is a great suggestion. We "rebuilt" the esbuild options with plugins etc internally to get a similar enough file that we can use to analyze the bundle.
Here is our
esbuild.mjs
I'd recommend making an issue for the feature request on https://github.com/cloudflare/workers-sdk/issues - it's unlikely to be seen by the team here.
GitHub
🚀 Feature Request: Option to output esbuild metafile · Issue #4633 ...
Describe the solution Esbuild's metafile is a great way to get additional information about a build, and for example use it in Esbuild Size Analyzer to understand the bundle size. If the CLI co...
@janpio (Prisma) btw an alternative way to do this is you can just edit the code path to write the json in wrangler, and use something like a pnpm patch
If you just wanna do it temporarily
That’s what I did 😛
Thanks for making the issue
That would have been a pretty smart idea honestly, vs. my rebuilding the whole
esbuild
config until I had a similar enough result 😄