--no-macros flag, disable macros in node_modules

This commit is contained in:
Jarred Sumner
2023-05-31 15:05:38 -07:00
parent 68c1568075
commit 7057cb1982
13 changed files with 91 additions and 11 deletions

View File

@@ -207,8 +207,14 @@ pub const BuildCommand = struct {
this_bundler.options.jsx.development = !this_bundler.options.production;
this_bundler.resolver.opts.jsx.development = this_bundler.options.jsx.development;
if (ctx.debug.macros) |macros| {
this_bundler.options.macro_remap = macros;
switch (ctx.debug.macros) {
.disable => {
this_bundler.options.no_macros = true;
},
.map => |macros| {
this_bundler.options.macro_remap = macros;
},
.unspecified => {},
}
// var env_loader = this_bundler.env;