-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
watchFiles
and watchDirs
are excluded from Metafile
#1268
Comments
I just looked into this and I think there are two problems with this proposal:
See also: |
With version 0.17 context was introduced, is this now possible? The metafile could have new top level properties watchFiles and watchDirs, so they can be differentiated from normal inputs. |
I've added https://github.com/aleclarson/esbuild-extra |
Plugins recently got the ability to return
watchFiles
orwatchDirs
that cause a re-build when they are modified.Our build pipeline (amphtml) is complicated enough that we can't use esbuild's
{watch: true}
. Instead, we rely on early Metafile results to trigger a re-build ourselves.We expected
watchFiles
/Dirs
to be included in the Metafile, but they are not.Build config
source.mjs
Metafile output vs. expected
{ "inputs": { "source.mjs": { "bytes": 77, "imports": [] }, + "foo.whatever": {...} }, "outputs": { "source.js": { "imports": [], "exports": [], "entryPoint": "source.mjs", "inputs": { "source.mjs": { "bytesInOutput": 132 } }, "bytes": 191 } } }
I understand that the semantics of a watched file and an input file might be different. Regardless of whether they're a part of
inputs
or not, it would still be super useful if we could obtain returnedwatchFiles
from thebuild()
result.The text was updated successfully, but these errors were encountered: