Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lexical-react] Bug Fix: Use automatic jsx runtime with react/jsx-runtime -> react alias in www #6143

Merged
merged 1 commit into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading