Bug fixes

Former-commit-id: 853b372665a3762b1eeeb2202e279895bce6f544
This commit is contained in:
Jarred Sumner
2021-08-26 15:09:53 -07:00
parent 029ba1ea44
commit a6bf54668a
4 changed files with 150 additions and 108 deletions

View File

@@ -394,8 +394,10 @@ pub const Arguments = struct {
};
}
if (entry_points.len == 0 and opts.framework == null and opts.node_modules_bundle_path == null) {
return error.MissingEntryPoint;
if (cmd == .BunCommand or !FeatureFlags.dev_only) {
if (entry_points.len == 0 and opts.framework == null and opts.node_modules_bundle_path == null) {
return error.MissingEntryPoint;
}
}
opts.output_dir = output_dir;
@@ -497,7 +499,7 @@ pub const Command = struct {
log: *logger.Log,
allocator: *std.mem.Allocator,
pub fn create(allocator: *std.mem.Allocator, log: *logger.Log, comptime command: Command.Tag) !Context {
pub fn create(allocator: *std.mem.Allocator, log: *logger.Log, comptime command: Command.Tag) anyerror!Context {
return Command.Context{
.args = try Arguments.parse(allocator, command),
.log = log,