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
How do I watch and run a build? #3687
Comments
Node.js has a # concurrently
esbuild --watch main.ts --bundle --platform=node --outdir=.
node --watch main.js |
Thanks for the reply. How performant is that in comparison with let's say |
I didn't run benchmarks. However you may find some clue in their technical details:
However esbuild is quite fast, even a full build often only takes 0.5s. I don't think performance that matters in this situation. Note that the build mode can give you plugins and less dependencies. |
Looks like it never ends up running "build:watch": "esbuild --watch src/server.ts --bundle --platform=node --outdir=dist",
"node:watch": "doppler run -- node --watch dist/server.js",
"dev": "pnpm build:watch && pnpm node:watch", and the logs
|
The shell operator By concurrently I mean you can start 2 terminals to execute them individually, or using the |
My apologies, I miss understood. Well tbh, that doesn't sound 'developer friendly'. Guess I'll have to stick with tsx for now to watch and run my files. Thanks for the help! |
There're tons of tools around esbuild to make common tasks have good DX like |
Thanks for that |
Something similar to
tsx watch src/index.ts
, is there an option in esbuild? The--watch
option will not run the file.The text was updated successfully, but these errors were encountered: