diff --git a/scripts/build.js b/scripts/build.js index d80d5a6d1bf..a9d4193f938 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -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', }; /** @@ -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'}], ], }), {