Skip to content

Commit 536db5a

Browse files
committed
Do not throw errors if --watch flag is passed
1 parent 8b20363 commit 536db5a

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

lib/install/bun/bun.config.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,16 @@ const config = {
55
sourcemap: "external",
66
entrypoints: ["app/javascript/application.js"],
77
outdir: path.join(process.cwd(), "app/assets/builds"),
8+
throw: !process.argv.includes('--watch'),
89
};
910

1011
const build = async (config) => {
1112
const result = await Bun.build(config);
1213

1314
if (!result.success) {
14-
if (process.argv.includes('--watch')) {
15-
console.error("Build failed");
16-
for (const message of result.logs) {
17-
console.error(message);
18-
}
19-
return;
20-
} else {
21-
throw new AggregateError(result.logs, "Build failed");
15+
console.error("Build failed");
16+
for (const message of result.logs) {
17+
console.error(message);
2218
}
2319
}
2420
};

0 commit comments

Comments
 (0)