aboutsummaryrefslogtreecommitdiff
path: root/src/cli/build_command.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli/build_command.zig')
-rw-r--r--src/cli/build_command.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cli/build_command.zig b/src/cli/build_command.zig
index 1b8e5c632..6b2a6761e 100644
--- a/src/cli/build_command.zig
+++ b/src/cli/build_command.zig
@@ -54,6 +54,12 @@ pub const BuildCommand = struct {
this_bundler.options.code_splitting = ctx.bundler_options.code_splitting;
this_bundler.resolver.opts.code_splitting = ctx.bundler_options.code_splitting;
+ if (this_bundler.options.entry_points.len > 1 and ctx.bundler_options.outdir.len == 0) {
+ Output.prettyErrorln("<red>error<r>: must use \"outdir\" when there are multiple input files", .{});
+ Global.exit(1);
+ return;
+ }
+
this_bundler.configureLinker();
// This step is optional