Skip to content

Commit

Permalink
Externalize all React entrypoints
Browse files Browse the repository at this point in the history
Fixes React 19 compat issues due to bundling JSX dev runtime.
Also enables future applications of React Compiler to bundled MDX.
  • Loading branch information
eps1lon committed May 28, 2024
1 parent 073d910 commit 6dae7e5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@ async function bundleMDX({
varName: '_jsx_runtime',
type: 'cjs',
},
'react/jsx-dev-runtime': {
varName: '_jsx_runtime',
type: 'cjs'
},
'react/compiler-runtime': {
varName: '_react_compiler_runtime',
type: 'cjs'
}
}),
// eslint-disable-next-line new-cap
NodeResolvePlugin({
Expand Down

0 comments on commit 6dae7e5

Please sign in to comment.