diff --git a/src/bundler.zig b/src/bundler.zig index 489af2db46..57909a49ef 100644 --- a/src/bundler.zig +++ b/src/bundler.zig @@ -311,12 +311,9 @@ pub const Bundler = struct { // Resolving a public file has special behavior if (bundler.options.public_dir_enabled) { // On Windows, we don't keep the directory handle open forever because Windows doesn't like that. - const public_dir: std.fs.Dir = bundler.options.public_dir_handle orelse std.fs.openDirAbsolute(resolve_path.normalizeAndJoin( - bundler.fs.top_level_dir, - .auto, - bundler.options.public_dir, - ), .{}) catch |err| { + const public_dir: std.fs.Dir = bundler.options.public_dir_handle orelse std.fs.openDirAbsolute(bundler.options.public_dir, .{}) catch |err| { log.addErrorFmt(null, logger.Loc.Empty, allocator, "Opening public directory failed: {s}", .{@errorName(err)}) catch unreachable; + Output.printErrorln("Opening public directory failed: {s}", .{@errorName(err)}); bundler.options.public_dir_enabled = false; return error.PublicDirError; }; diff --git a/src/cli.zig b/src/cli.zig index e3c9fa1862..e24d257b93 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -180,8 +180,8 @@ pub const Cli = struct { var react_fast_refresh = args.flag("--react-fast-refresh"); var main_fields = args.options("--main-fields"); - comptime const PlatformMatcher = strings.ExactSizeMatcher(8); - comptime const ResoveMatcher = strings.ExactSizeMatcher(8); + const PlatformMatcher = strings.ExactSizeMatcher(8); + const ResoveMatcher = strings.ExactSizeMatcher(8); var resolve = Api.ResolveMode.lazy; if (args.option("--resolve")) |_resolve| { @@ -295,6 +295,7 @@ pub const Cli = struct { if (args.serve orelse false) { try Server.start(allocator, args); + return; }