rsms / estrella

Lightweight and versatile build tool based on the esbuild compiler
ISC License
1.1k stars 38 forks source link

Metafile not being written #50

Open ldgrp opened 2 years ago

ldgrp commented 2 years ago

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:

Darkle commented 2 years ago

Bump