Skip to content

Commit

Permalink
esbuild breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Feb 11, 2023
1 parent e021751 commit f6ea91e
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions scripts/build_themes.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// @ts-check
const esbuild = require("esbuild");

esbuild
.build({
async function main() {
const context = await esbuild.context({
entryPoints: ["src/lib/output/themes/default/assets/bootstrap.ts"],
bundle: true,
minify: true,
Expand All @@ -10,9 +11,18 @@ esbuild
js: '"use strict";',
},
logLevel: "info",
watch: process.argv.slice(2).includes("--watch"),
})
.catch((err) => {
console.error(err);
process.exitCode = 1;
});

await context.rebuild();

if (process.argv.slice(2).includes("--watch")) {
await context.watch();
} else {
await context.dispose();
}
}

main().catch((err) => {
console.error(err);
process.exitCode = 1;
});

0 comments on commit f6ea91e

Please sign in to comment.