Skip to content

Commit b81c628

Browse files
authoredMay 16, 2024··
fix: Externalize JSX runtime (#655)
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.
1 parent 79fec4c commit b81c628

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎core/.kktrc.ts

+12
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ export default (conf: WebpackConfiguration, env: 'production' | 'development', o
6565
commonjs: 'react-dom',
6666
amd: 'react-dom',
6767
},
68+
'react/jsx-runtime': {
69+
root: 'ReactJSXRuntime',
70+
commonjs2: 'react/jsx-runtime',
71+
commonjs: 'react/jsx-runtime',
72+
amd: 'react/jsx-runtime',
73+
},
74+
'react/jsx-dev-runtime': {
75+
root: 'ReactJSXDevRuntime',
76+
commonjs2: 'react/jsx-dev-runtime',
77+
commonjs: 'react/jsx-dev-runtime',
78+
amd: 'react/jsx-dev-runtime',
79+
},
6880
};
6981
}
7082
return conf;

0 commit comments

Comments
 (0)
Please sign in to comment.