diff options
author | 2023-07-22 16:42:05 -0700 | |
---|---|---|
committer | 2023-07-22 16:42:17 -0700 | |
commit | 27c88c8046ca9f815b9f211c29002e47123b4544 (patch) | |
tree | cb86a038b9621e0c28d1b1741fb81e9ca88d910a | |
parent | 04d19d6f6a0765305cd85e137e1b834b1b0cc735 (diff) | |
download | bun-27c88c8046ca9f815b9f211c29002e47123b4544.tar.gz bun-27c88c8046ca9f815b9f211c29002e47123b4544.tar.zst bun-27c88c8046ca9f815b9f211c29002e47123b4544.zip |
Fixes #3753
-rw-r--r-- | src/bundler.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bundler.zig b/src/bundler.zig index ec8f6b5df..b1d7cb719 100644 --- a/src/bundler.zig +++ b/src/bundler.zig @@ -1423,9 +1423,11 @@ pub const Bundler = struct { opts.filepath_hash_for_hmr = file_hash orelse 0; opts.features.auto_import_jsx = bundler.options.auto_import_jsx; opts.warn_about_unbundled_modules = target.isNotBun(); - opts.features.jsx_optimization_inline = opts.features.allow_runtime and (bundler.options.jsx_optimization_inline orelse (target.isBun() and jsx.parse and + opts.features.jsx_optimization_inline = opts.features.allow_runtime and + (bundler.options.jsx_optimization_inline orelse (target.isBun() and jsx.parse and !jsx.development)) and - (jsx.runtime == .automatic or jsx.runtime == .classic); + (jsx.runtime == .automatic or jsx.runtime == .classic) and + strings.eqlComptime(jsx.import_source.production, "react/jsx-runtime"); opts.features.jsx_optimization_hoist = bundler.options.jsx_optimization_hoist orelse opts.features.jsx_optimization_inline; opts.features.hoist_bun_plugin = this_parse.hoist_bun_plugin; |