Skip to content

Commit a6f84c3

Browse files
committed
Update bundler
1 parent d0d2d91 commit a6f84c3

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

bundler.js

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,22 @@ await mkdir(directoryOutput, { recursive: true });
1414

1515
// Create bundle.
1616
for (const script of scripts.values()) {
17-
const { code } = await ncc(pathJoin(directoryInput, script), {
18-
assetBuilds: false,
19-
cache: false,
20-
debugLog: false,
21-
license: "",
22-
minify: true,
23-
quiet: false,
24-
sourceMap: false,
25-
sourceMapRegister: false,
26-
target: "es2022",
27-
v8cache: false,
28-
watch: false
29-
});
30-
await writeFile(pathJoin(directoryOutput, script), code, { encoding: "utf8" });
17+
try {
18+
const { code } = await ncc(pathJoin(directoryInput, script), {
19+
assetBuilds: false,
20+
cache: false,
21+
debugLog: false,
22+
license: "",
23+
minify: true,
24+
quiet: false,
25+
sourceMap: false,
26+
sourceMapRegister: false,
27+
target: "es2022",
28+
v8cache: false,
29+
watch: false
30+
});
31+
await writeFile(pathJoin(directoryOutput, script), code, { encoding: "utf8" });
32+
} catch (error) {
33+
console.error(error);
34+
}
3135
}

0 commit comments

Comments
 (0)