Skip to content

--metafile doesn't work with --watch #1357

@JRaspass

Description

@JRaspass

Unless I'm using it wrong, I can't get the CLI to generate a metafile when under watch mode:

$ node_modules/.bin/esbuild --version
0.12.6
$ ls dist esbuild.json
ls: cannot access 'dist': No such file or directory
ls: cannot access 'esbuild.json': No such file or directory

$ node_modules/.bin/esbuild --metafile=esbuild.json --outdir=dist --watch views/js/hole-ng.js
[watch] build finished, watching for changes...
[watch] build started (change: ".")
[watch] build finished
^C

$ ls dist esbuild.json
ls: cannot access 'esbuild.json': No such file or directory
dist:
hole-ng.js

Whereas it works fine without the watch flag:

$ node_modules/.bin/esbuild --metafile=esbuild.json --outdir=dist views/js/hole-ng.js

  dist/hole-ng.js  10.2kb

⚡ Done in 10ms

$ ls dist esbuild.json
esbuild.json

dist:
hole-ng.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions