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

Non-official watch mode wrapper #481

Closed
ghost opened this issue Oct 21, 2020 · 3 comments
Closed

Non-official watch mode wrapper #481

ghost opened this issue Oct 21, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Oct 21, 2020

Hi there Evan!

First, thank you for the great work you've done with esbuild, this tool is simply amazing, in comparison with rollup/webpack

Recently, i've been working on eswatch, a simple wrapper around esbuild built with chokidar for watching, building and running files instantly, even though the project is just a PoC in early development stage, i tested it with a couple of node-based personal projects (including ones with typescript), and it works really well, even for CLI applications with prompts (like inquirer), as esbuild still don't have an built-in watch mode feature available, do you think that this non-official alternative should be recommended on the documentation?

Unfortunately, i'm not that familiar with esbuild codebase, and i opted to build a wrapper from scratch as for me, it would be faster and easier, but if i could contribute in any way, let me know, this project is really promising

@nettybun
Copy link

I think it's very nice to see personal watchers but it's also a very opinionated topic as some people want generic tools/binaries like watchexec or to roll their own implementation in Node (as you have) since it's only a few lines of code.

It's hard to make something "official" that's not built into the esbuild binary since it will always be leaving out someone's use case. As you've discovered yourself, it's probably better to build your own personal version.

@David-Else
Copy link

I have used https://github.com/egoist/rollup-plugin-esbuild which seems nice and minimal.

I hope ESBuild gets its own watch soon, would be great to get rid of more dependencies.

@evanw
Copy link
Owner

evanw commented Nov 20, 2020

There is also https://github.com/rsms/estrella, which runs tsc for you. I'm not planning on recommending a single non-official alternative in the documentation since there are many different approaches to wrappers. Closing this issue in favor of the existing one about watch mode: #21. FYI the next release will hopefully have an incremental build API that will make watch mode wrappers more ergonomic and efficient, and a way to run esbuild as a local file server which replaces some use cases for watch mode.

@evanw evanw closed this as completed Nov 20, 2020
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

3 participants