mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user