From f0beebd3ef1f112449cae751edca753962a49920 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Wed, 15 May 2024 04:49:05 -0700 Subject: [PATCH] Externalize JSX runtime The JSX runtime is currently being bundled which is generally not supported. The JSX runtime needs to be in lockstep with the React version. This currently breaks in React 19 because the bundled JSX runtime tries to access secret internals that have been moved. --- core/.kktrc.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/.kktrc.ts b/core/.kktrc.ts index 3fefa0020..961cc465a 100644 --- a/core/.kktrc.ts +++ b/core/.kktrc.ts @@ -65,6 +65,18 @@ export default (conf: WebpackConfiguration, env: 'production' | 'development', o commonjs: 'react-dom', amd: 'react-dom', }, + 'react/jsx-runtime': { + root: 'ReactJSXRuntime', + commonjs2: 'react/jsx-runtime', + commonjs: 'react/jsx-runtime', + amd: 'react/jsx-runtime', + }, + 'react/jsx-dev-runtime': { + root: 'ReactJSXDevRuntime', + commonjs2: 'react/jsx-dev-runtime', + commonjs: 'react/jsx-dev-runtime', + amd: 'react/jsx-dev-runtime', + }, }; } return conf;