When building extensions under the new very restrictive bundle size limits, its hard to know what the output size of an extension is going to be before building it, or what is contributing to the total size of the bundle. As best I can tell, @shopify/cli uses esbuild under the hood, which can produce a metafile describing the bundle with metafile: true, which you can then analyze with tools like https://bundle-buddy.com/esbuild to see what is inflating the bundle!
Could y’all add an option to produce these metafiles on demand so we can analyze our bundles to keep them small?
Also of note, because @shopify/cli fully controls the build process, and customizes it a fair amount with esbuild options and plugins, its hard for us in userland to simulate it accurately and do this ourselves!