Skip to content

Commit

Permalink
fix: esbuild upgrade causing production build to stall
Browse files Browse the repository at this point in the history
  • Loading branch information
artisticat1 committed Apr 11, 2024
1 parent 04ea9e4 commit 6edcef8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ if you want to view the source, please visit the github repository of this plugi
`;

const prod = (process.argv[2] === "production");

esbuild.context({
const args = {
banner: {
js: banner,
},
Expand Down Expand Up @@ -53,4 +52,12 @@ esbuild.context({
plugins: [
inlineImportPlugin()
]
}).then(ctx => prod || ctx.watch()).catch(() => process.exit(1));
};

if (!prod) {
const ctx = await esbuild.context(args);
ctx.watch().catch(() => process.exit(1));
}
else {
esbuild.build(args).catch(() => process.exit(1));
}

0 comments on commit 6edcef8

Please sign in to comment.