estrella
estrella copied to clipboard
Metafile not being written
Hi! I was trying to figure out the bundle size of an app and found that estrella
does not output the metafiles produced by esbuild.
The following build.js
file is expected to produce a metafile. https://esbuild.github.io/api/#metafile
#!/usr/bin/env node
const { build } = require("estrella")
build({
entry: "src/main.ts",
outfile: "dist/foo.js",
metafile: true,
bundle: true,
})
When using the javascript API for esbuild
, it is up to the consumer to parse the result and write the metadata to a file. Currently, estrella
simply passes the metafile
property to esbuild, but does nothing with it. To keep things simple i propose:
- for config.outdir : create a metafile in the output directory named
${config.outdir}.meta.json
- for config.outfile : create a metafile in the output directory named
${config.outfile}.meta.json
Bump