Skip to content

Commit

Permalink
fix: Externalize JSX runtime (#655)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eps1lon authored May 16, 2024
1 parent 79fec4c commit b81c628
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/.kktrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b81c628

Please sign in to comment.