Cloudflare DevelopersCD
Cloudflare Developersโ€ข9mo agoโ€ข
1 reply
ItsWendell

`--metafile` flag released in wrangler!

Thrilled that my first PR for Cloudflare's wrangler just landed in v4.15.0! ๐ŸŽ‰ This PR adds a new
--metafile
flag to the wrangler CLI. This outputs esbuild's metafile, which can then be used to easily analyze your Cloudflare Worker's bundle size!

Update wrangler to v6.15.0 or newer, then simply run:
npx wrangler deploy --dry-run --metafile=./meta.json && npx banal -M ./meta.json
(or add to your package.json file as
analyze
).

This command uses banal โ€“ it's a great tool by fabiospampinato that provides an offline version of esbuild's web analyzer. Makes peeking into your bundle super easy!
Screenshot_From_2025-05-13_20-53-01.png
Was this page helpful?