aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-21 18:03:07 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-21 18:03:07 -0700
commit9423693a6eb68b744473632845387d306e58f914 (patch)
treece3b0d724b7edc3a38e1923a71c9fd74d8608175 /src/bun.js/api
parent8b9462fde5cfa17cc20f59f0f92372a1484a4e48 (diff)
downloadbun-9423693a6eb68b744473632845387d306e58f914.tar.gz
bun-9423693a6eb68b744473632845387d306e58f914.tar.zst
bun-9423693a6eb68b744473632845387d306e58f914.zip
[breaking] In Bun.Transpiler, don't wrap CommonJS modules in `export default`
Diffstat (limited to 'src/bun.js/api')
-rw-r--r--src/bun.js/api/JSTranspiler.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bun.js/api/JSTranspiler.zig b/src/bun.js/api/JSTranspiler.zig
index c68fc75a0..c4968a6ee 100644
--- a/src/bun.js/api/JSTranspiler.zig
+++ b/src/bun.js/api/JSTranspiler.zig
@@ -804,6 +804,8 @@ pub fn constructor(
if (transpiler_options.minify_identifiers)
bundler.options.minify_identifiers = true;
+ bundler.options.transform_only = !bundler.options.allow_runtime;
+
bundler.options.tree_shaking = transpiler_options.tree_shaking;
bundler.options.trim_unused_imports = transpiler_options.trim_unused_imports;
bundler.options.allow_runtime = transpiler_options.runtime.allow_runtime;