Esbuild, build esm

This commit is contained in:
Adria Navarro 2023-08-08 19:34:20 +03:00
parent b91677f0ce
commit a213475041
1 changed files with 7 additions and 0 deletions

View File

@ -59,9 +59,16 @@ function runBuild(entry, outfile) {
],
}
const { compilerOptions } = tsconfigPathPluginContent
const format =
compilerOptions.target === "es6" && compilerOptions.module !== "commonjs"
? "esm"
: undefined
build({
...sharedConfig,
platform: "node",
format,
outfile,
}).then(result => {
glob(`${process.cwd()}/src/**/*.hbs`, {}, (err, files) => {