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 analysis
6 Replies
Jan Piotrowski (janpio)
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.
Jan Piotrowski (janpio)
Here is our esbuild.mjs
kian
kian9mo ago
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.
Jan Piotrowski (janpio)
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...
Bulbasaur
Bulbasaur9mo ago
@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
Jan Piotrowski (janpio)
That would have been a pretty smart idea honestly, vs. my rebuilding the whole esbuild config until I had a similar enough result 😄
Want results from more Discord servers?
Add your server