Fix: build async bug

This commit is contained in:
xiangyu 2022-08-24 19:17:00 +08:00
parent fdbf369454
commit 8bad0cffff

View File

@ -83,6 +83,7 @@ function dateFormat(fmt, date) {
return fmt;
}
async function main() {
const t = new Date();
const buildTime = dateFormat("YYYY-mm-dd HH:MM:SS", t);
const buildDir = "builds";
@ -95,7 +96,7 @@ clearFolder(buildDir);
copyFolderRecursiveSync("addon", buildDir);
esbuild
await esbuild
.build({
entryPoints: ["src/index.ts"],
bundle: true,
@ -169,3 +170,6 @@ console.log("[Build] Addon pack OK");
console.log(
`[Build] Finished in ${(new Date().getTime() - t.getTime()) / 1000} s.`
);
}
main();