aboutsummaryrefslogtreecommitdiff
path: root/src/cli.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-14 23:09:14 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-14 23:09:14 -0700
commite977bfb5a79e48b91430a8df6eff1da617ff2da6 (patch)
tree938c00a51ab070968817f60926f7743193fa8b2a /src/cli.zig
parent81e11ae58663d07b960c9da4d36f378d09bfbfdb (diff)
downloadbun-e977bfb5a79e48b91430a8df6eff1da617ff2da6.tar.gz
bun-e977bfb5a79e48b91430a8df6eff1da617ff2da6.tar.zst
bun-e977bfb5a79e48b91430a8df6eff1da617ff2da6.zip
Implement `--transform` CLI flag
Diffstat (limited to 'src/cli.zig')
-rw-r--r--src/cli.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cli.zig b/src/cli.zig
index f9c3f403f..674aeac02 100644
--- a/src/cli.zig
+++ b/src/cli.zig
@@ -69,7 +69,7 @@ pub const Cli = struct {
log.printForLogLevelWithEnableAnsiColors(Output.errorWriter(), false) catch {};
}
- Reporter.globalError(err);
+ Reporter.globalError(err, @errorReturnTrace());
},
}
};
@@ -198,6 +198,7 @@ pub const Arguments = struct {
clap.parseParam("--outfile <STR> Write to a file") catch unreachable,
clap.parseParam("--server-components Enable React Server Components (experimental)") catch unreachable,
clap.parseParam("--splitting Split up code!") catch unreachable,
+ clap.parseParam("--transform Do not bundle") catch unreachable,
};
// TODO: update test completions
@@ -497,6 +498,7 @@ pub const Arguments = struct {
var output_file: ?string = null;
if (cmd == .BuildCommand) {
+ ctx.bundler_options.transform_only = args.flag("--transform");
if (args.option("--outdir")) |outdir| {
if (outdir.len > 0) {
ctx.bundler_options.outdir = outdir;
@@ -909,6 +911,7 @@ pub const Command = struct {
entry_names: []const u8 = "./[name].[ext]",
react_server_components: bool = false,
code_splitting: bool = false,
+ transform_only: bool = false,
};
const _ctx = Command.Context{