From c17e1c6bd0065fa443a07139ddaf8f167b16bf73 Mon Sep 17 00:00:00 2001 From: leegeunhyeok Date: Fri, 27 Oct 2023 09:12:23 +0900 Subject: [PATCH] feat(transformer): supports runtime jsx transformation --- packages/transformer/lib/transformer/swc/presets.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/transformer/lib/transformer/swc/presets.ts b/packages/transformer/lib/transformer/swc/presets.ts index c5dcce1d..f42394f5 100644 --- a/packages/transformer/lib/transformer/swc/presets.ts +++ b/packages/transformer/lib/transformer/swc/presets.ts @@ -34,6 +34,13 @@ const getReactNativeRuntimePreset = (): TransformerOptionsPreset => { loose: false, externalHelpers: true, keepClassNames: true, + transform: { + react: { + runtime: 'automatic', + development: context.dev, + refresh: false, + }, + }, }, filename: context.path, root: context.root, @@ -70,6 +77,8 @@ const getJestPreset = ( }, react: { runtime: 'automatic', + development: context.dev, + refresh: false, }, }, experimental: {