Open janpio opened 11 months ago
@janpio thanks for this suggestion. We have some upcoming work around the build system so I'm adding this feature request to that milestone.
hi @janpio :) we've moved this from the milestone but just wanted to let you know that we we are still tracking this suggestion through the start-dev-worker
and enhancement
labels :)
Hi @lrapoport-cf :wave:,
I'm not quite sure what the removal from the project means, is this still on the roadmap? I'd also love to see this, the metafile would've saved me hours of debugging time yesterday.
I see that it's tagged with start-dev-worker which can complicate matters, for my use case a simple --metafile <filename>
would be sufficient which saves the metafile after a full build.
hi @DaniFoldi :) we were doing issue cleanup and assigning feature requests not actively being worked on to be solely in the workers-sdk roadmap project. however, this should be relatively straightforward to address -- @penalosa will follow up 👍 we've moved it back into the workers-sdk project and assigned it accordingly :)
+1
It'd also be nice to have this option for Pages Functions as well (with wrangler pages functions build
)
Another vote for this feature.
I often have to reach for a custom build with my own esbuild setup to get this kind of information out. Especially with Cloudflare adding more polyfills when using nodejs_compat
and things, being able to extract esbuild's metafile and analyse the size impact of my own code vs boilerplate code for example would be really nice.
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 could "export" the Esbuild metafile it creates under the hood, that would be optimal.
As this is currently not implements, I quickly hacked together this almost-close-enough esbuild script that uses similar plugins. It brings most of my workers pretty close in size and code - so I am ok using this for now: