Open brianjenkins94 opened 1 month ago
I can do this with esbuild:
esbuild
const bundle = (await esbuild.build({ "bundle": true, "format": "esm", "stdin": { "resolveDir": __dirname, "sourcefile": "input.ts", "contents": contents }, "write": false })).outputFiles[0]
Would be neat if I could do the same with tsup:
tsup
const bundle = tsup.build({ "esbuildOptions": {}, "esbuildPlugins": [], "format": "esm", "treeshake": true, "entry": entry }); // OR const bundle = await new Promise(function(resolve, reject) { tsup.build({ "onSuccess": function({ outputFiles }) { resolve(outputFiles[0]); } }); });
Whoops, this may be a duplicate of https://github.com/egoist/tsup/issues/1082.
I can do this with
esbuild
:Would be neat if I could do the same with
tsup
:Upvote & Fund