Support bun.json

This commit is contained in:
Colin McDonnell
2023-08-15 17:42:20 -07:00
parent f629365cb7
commit edb6ed62a4
5 changed files with 161 additions and 44 deletions

View File

@@ -933,7 +933,9 @@ pub const RunCommand = struct {
// once we know it's a file, check if they have any preloads
if (ext.len > 0 and !has_loader) {
if (!ctx.debug.loaded_bunfig) {
try bun.CLI.Arguments.loadConfigPath(ctx.allocator, true, "bunfig.toml", &ctx, .RunCommand);
_ = bun.CLI.Arguments.loadConfigPath(ctx.allocator, true, "bun.json", &ctx, .RunCommand) catch brk: {
break :brk bun.CLI.Arguments.loadConfigPath(ctx.allocator, true, "bunfig.toml", &ctx, .RunCommand) catch false;
};
}
if (ctx.preloads.len == 0)