esbuild
esbuild copied to clipboard
Building code to a variable
Hi, I'm using esbuild progammatically like this:
esbuild.build({
plugins: [],
entryPoints: [input],
outfile: output,
bundle: true,
minify: false,
})
Is it possible to return the results to a variable instead of outputting to a file?
If not, is it intentional?
https://esbuild.github.io/api/#write
Closing as there is nothing to be done here. Hopefully the documentation in the above link is sufficient.
I came looking to open an issue requesting this and fortunately found this issue. I would have expected this to be mentioned in either https://esbuild.github.io/getting-started/#build-scripts or https://esbuild.github.io/api/#build-api or under the various out*
options. I would appreciate some part of the docs where the JavaScript API is fully documented in one place, including the possible return values of build()
.