Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metafile not being written #50

Open
ldgrp opened this issue Dec 14, 2021 · 1 comment
Open

Metafile not being written #50

ldgrp opened this issue Dec 14, 2021 · 1 comment

Comments

@ldgrp
Copy link

ldgrp commented Dec 14, 2021

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
@Darkle
Copy link

Darkle commented Jun 19, 2022

Bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants