esbuild
esbuild copied to clipboard
Allowing other platforms to communicate with esbuild (Like nodejs does)
Hello @evanw,
I am one of the maintainers of the new https://github.com/mvnpm/esbuild-java, which is key to the https://github.com/quarkiverse/quarkus-web-bundler.
Currently we are using the esbuild CLI binary under the hood, it is already very fast and reliable, but:
- For scss, we have to do a very brittle pre-processing using a java scss compiler
- We can't use any esbuild plugins
- we can't use the Rebuild command which would be nice for our dev mode
This is why I am looking at ways we could do something similar as the NodeJs implementation to communicate, so I had a look at the sources to find out how the communication is done from the nodejs to the process through IPC (and also found this issue https://github.com/evanw/esbuild/issues/306).
What's your opinion on this? is this something you considered (allowing to communicate with the process from external clients/platforms)? is there plan to document the communication protocol?
@evanw any udpate on this?
You are welcome to build on esbuild's internal implementation details to make something like this work. The protocol is pretty simple (see this and this) and hasn't changed for quite some time. Just keep in mind that it's an internal implementation detail of esbuild and could hypothetically be changed at some point in the future. In any case, I'm closing this issue because I consider this to be an internal implementation detail of esbuild, and not a public API to be documented.