aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api/JSBundler.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/api/JSBundler.zig')
-rw-r--r--src/bun.js/api/JSBundler.zig7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bun.js/api/JSBundler.zig b/src/bun.js/api/JSBundler.zig
index 741d956bf..8e85f1190 100644
--- a/src/bun.js/api/JSBundler.zig
+++ b/src/bun.js/api/JSBundler.zig
@@ -61,6 +61,7 @@ pub const JSBundler = struct {
code_splitting: bool = false,
minify: Minify = .{},
server_components: ServerComponents = ServerComponents{},
+ no_macros: bool = false,
names: Names = .{},
external: bun.StringSet = bun.StringSet.init(bun.default_allocator),
@@ -188,6 +189,12 @@ pub const JSBundler = struct {
}
}
+ if (config.getTruthy(globalThis, "macros")) |macros_flag| {
+ if (!macros_flag.coerce(bool, globalThis)) {
+ this.no_macros = true;
+ }
+ }
+
if (try config.getOptionalEnum(globalThis, "target", options.Target)) |target| {
this.target = target;
}