Compare commits

...

4 Commits

Author SHA1 Message Date
Dylan Conway
512ed11b10 update 2025-05-16 09:34:18 -07:00
Dylan Conway
1eaa32c383 update 2025-05-16 09:31:11 -07:00
Dylan Conway
7a9c0d9c4c update 2025-05-16 09:28:07 -07:00
Dylan Conway
b16102c011 fix assert 2025-05-16 09:25:56 -07:00

View File

@@ -224,16 +224,13 @@ pub const BuildCommand = struct {
this_transpiler.options.env.prefix = ctx.bundler_options.env_prefix;
if (ctx.bundler_options.production) {
try this_transpiler.env.map.put("BUN_ENV", "production");
try this_transpiler.env.map.put("NODE_ENV", "production");
}
try this_transpiler.configureDefines();
this_transpiler.configureLinker();
if (ctx.bundler_options.production) {
bun.assert(!this_transpiler.options.jsx.development);
}
if (!this_transpiler.options.production) {
try this_transpiler.options.conditions.appendSlice(&.{"development"});
}
@@ -242,6 +239,10 @@ pub const BuildCommand = struct {
this_transpiler.options.jsx.development = !this_transpiler.options.production;
this_transpiler.resolver.opts.jsx.development = this_transpiler.options.jsx.development;
if (ctx.bundler_options.production) {
bun.assert(!this_transpiler.options.jsx.development);
}
switch (ctx.debug.macros) {
.disable => {
this_transpiler.options.no_macros = true;