esbuild-loader
esbuild-loader copied to clipboard
Add support for stopping the ESBuild service on Webpack shutdown
Calling the new stop
API mentioned in the release notes: https://github.com/evanw/esbuild/releases/tag/v0.19.11
Can you tell me more about the motivation of this change?
Few thoughts:
- In most cases, this shouldn't be necessary as the loader is loaded by Webpack to build and exit. I'm thinking it only makes sense if Webpack is loaded via Node API.
- Does this exit in Webpacks watch mode?
- Will esbuild be re-spawned if used after exit is called?
- We allow custom esbuild to be passed in. So this stop method will have to be supported there too. Maybe update
implementation
to accept the entire esbuild export (e.g.import * as esbuild from 'esbuild'
) Note this will need to be backwards compatible with just passing intransform
.
I'm pulling out the esbuild upgrade here as the tests need to be updated: https://github.com/privatenumber/esbuild-loader/pull/355
Closing due to lack of activity