this is useful if someone will create a plugin or any tools using esbuild
i did jest transformer (https://github.com/aelbore/esbuild-jest),
im using rollup and rollup-plugin-esbuild then sync-rpc to wrap the async
it would be good if build api would output result string
I would like to do this. The underlying transport mechanism for the API is already built this way, but the API currently only exposes the ability to transform a single file. So it's definitely possible to do this.
@evanw Ref your question in #183 I did some quick benchmarks in my test suite.
babel
: 10.18s cold, 4.46s cached
esbuild-jest
: 5.48s cold, 2.79s cached
custom transformer with esbuild buildSync
: 3.36s cold, 2.72s cached
I think this will improve with another 10-20ms if I can skip the tmp file. Anyway these are great improvements. The only thing currently keeping me from getting rid og babel in jest is getting jest.mock working on external libraries.
@evanw this is amazing i will try once theres new version 馃憤馃コ
Version 0.5.22 with this change has now been published.
Most helpful comment
I would like to do this. The underlying transport mechanism for the API is already built this way, but the API currently only exposes the ability to transform a single file. So it's definitely possible to do this.