I'm using spawnAsync to run esbuild, so from the node's require point of view it's a sync call, while under the hood I call esbuild async methods build and transform which enables using esbuild plugins. This is battle tested in my company's huge monorepo, performance is still amazing.
I'll release my fork for now to unblock myself (https://www.npmjs.com/package/esbuild-runner-plugins), but I'll gladly work on improving this PR to get this into the mainstream. Looking forward to your feedback!
Would be great if the PR could be merged - meanwhile using the esbuild-runner-plugins works nicely and helped me running tests on svelte components using mocha and esbuild.
Fixes #32
I'm using
spawnAsync
to run esbuild, so from the node's require point of view it's a sync call, while under the hood I call esbuild async methodsbuild
andtransform
which enables using esbuild plugins. This is battle tested in my company's huge monorepo, performance is still amazing.I'll release my fork for now to unblock myself (https://www.npmjs.com/package/esbuild-runner-plugins), but I'll gladly work on improving this PR to get this into the mainstream. Looking forward to your feedback!