Skip to content

Commit

Permalink
[lexical-react] Bug Fix: Use automatic jsx runtime with react/jsx-run…
Browse files Browse the repository at this point in the history
…time -> react alias in www
  • Loading branch information
etrepum committed May 20, 2024
1 parent 0bdd6fb commit 6745473
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ const wwwMappings = {
'prismjs/components/prism-swift': 'prism-swift',
'prismjs/components/prism-typescript': 'prism-typescript',
'react-dom': 'ReactDOMComet',
// The react entrypoint in fb includes the jsx runtime
'react/jsx-runtime': 'react',
};

/**
Expand Down Expand Up @@ -192,7 +194,7 @@ async function build(name, inputFile, outputPath, outputFile, isProd, format) {
tsconfig: path.resolve('./tsconfig.build.json'),
},
],
['@babel/preset-react', {runtime: isWWW ? 'classic' : 'automatic'}],
['@babel/preset-react', {runtime: 'automatic'}],
],
}),
{
Expand Down

0 comments on commit 6745473

Please sign in to comment.