aboutsummaryrefslogtreecommitdiff
path: root/src/js_parser.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2023-05-24 18:52:50 -0700
committerGravatar GitHub <noreply@github.com> 2023-05-24 18:52:50 -0700
commit63740a382bbf65fc20fb9c1f1211fbc9285bd9e5 (patch)
tree7cdf3bc65e47ccc62196504798512f28e1d79562 /src/js_parser.zig
parented1f62ffffdd02db761513e8ac2561afa4b5a8dc (diff)
downloadbun-63740a382bbf65fc20fb9c1f1211fbc9285bd9e5.tar.gz
bun-63740a382bbf65fc20fb9c1f1211fbc9285bd9e5.tar.zst
bun-63740a382bbf65fc20fb9c1f1211fbc9285bd9e5.zip
Load `.env.test`, set NODE_ENV=test in `bun test`, load `.env.{test,production,development}.local` (#3037)
* Support `.env.test` & `.env.{test,production,development}.local` * Fix bug preventing inlining of process.env.NODE_ENV by default * Update env_loader.zig * add env tests --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: dave caruso <me@paperdave.net>
Diffstat (limited to 'src/js_parser.zig')
-rw-r--r--src/js_parser.zig10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/js_parser.zig b/src/js_parser.zig
index a0f4defae..dea2f044f 100644
--- a/src/js_parser.zig
+++ b/src/js_parser.zig
@@ -19451,13 +19451,9 @@ fn NewParser_(
return false;
}
- return
- // TODO: figure out why this is needed when bundling
- // The problem is all the top-level vars are getting removed when they're not actually side effect free
- !p.source.index.isRuntime() and
- // when there's actually no symbol by that name, we return Ref.None
- // If a symbol had already existed by that name, we return .unbound
- (result.ref.isNull() or p.symbols.items[result.ref.innerIndex()].kind == .unbound);
+ // when there's actually no symbol by that name, we return Ref.None
+ // If a symbol had already existed by that name, we return .unbound
+ return (result.ref.isNull() or p.symbols.items[result.ref.innerIndex()].kind == .unbound);
}
},
else => {},