-
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
Allow --summary to work in watch for tooling #751
Comments
It should be easy to do this with esbuild's build API. You can use |
That would require everyone who uses esbuild project and wants to use tasks to use the API to run their builds (and probably some package so that outputs would be standard) rather than the CLI. It'd be easy but less convenient for users -- more setup on their end. |
Would it be possible to print something else than the bubble animation? I usually run esbuild concurrently with other tasks in the same terminal via https://www.npmjs.com/package/concurrently and a |
The next release will have more structured watch mode output, although it is not exactly the same as |
Thanks, I have it working nicely with the output you added 🙂 https://marketplace.visualstudio.com/items?itemName=connor4312.esbuild-problem-matchers |
@connor4312 Did you have to add anything special to your esbuild watch code? |
nope, just --watch |
Interesting. I've downloaded your extension. Using
To build and VSCode doesn't seem to move past the task. ie, it starts the task and then hangs and never moves on to the executable. I wonder if --watch is doing something different than watch: true. |
What does your stdout/err look like when running that? |
Just triggered failing build
|
No output when files changed and no errors. From looking at your package, I'm assuming your's outputs
|
Will def do. I'll plug on this with the watch property function and submit a pr with the relevant info. Thank you @connor4312 great timing. |
In VS Code, task problem matchers are used to match against output and detect the state of the compilation.
A common pattern is to use a watch-mode compiler, like
webpack --watch
ortsc --watch
, as a background task. In addition to their usefulness as standalone tasks the user can run, these can also be used in debugging to, for instance, wait for compilation to be complete before running or restarting a program.esbuild's
--watch
mode is silent, and while it's usually super fast I ran into some cases where I would make a change and hit "debug" (which triggers a save) and the program would launch before the bundle was completely ready to go.It would be great if there was a way to have esbuild output more information for tooling in watch mode to know when it starting compiling, when it finishes, and when it errors (errors are already detectable). The
--summary
flag in normal compilation does this, so making it work in watch mode could be a convenient way to do this without adding more knobs or api.The text was updated successfully, but these errors were encountered: