You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
569 B

import esbuild from "esbuild";
import babel from "esbuild-plugin-babel";
(async () => {
try {
await esbuild.build({
entryPoints: ["src/index.js"],
bundle: true,
minify: true,
format: "iife",
target: "es2021",
outfile: "dist/build.js",
plugins: [babel()]
});
console.log("Build succeeded!");
process.exit(0);
} catch (e) {
console.error(e);
console.log("Build failed!");
process.exit(1);
}
})(); //IIFE to shutup lsp