Skip to content

Commit 0f1c804

Browse files
committed
Enable new JSX transform
1 parent fb3d8e4 commit 0f1c804

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

website/babel.config.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,16 @@ module.exports = (api) => {
2121
exclude: ['transform-typeof-symbol'],
2222
},
2323
],
24-
['@babel/preset-react', { development: !IS_PROD }],
24+
[
25+
'@babel/preset-react',
26+
{
27+
development: !IS_PROD,
28+
// Enable JSX transform
29+
// TODO: Remove in Babel 8, when this will be the default option
30+
// See: https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#manual-babel-setup
31+
runtime: 'automatic',
32+
},
33+
],
2534
];
2635

2736
const plugins = [

website/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
] /* Specify library files to be included in the compilation. */,
1111
"allowJs": true /* Allow javascript files to be compiled. */,
1212
// "checkJs": true, /* Report errors in .js files. */
13-
"jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
13+
"jsx": "preserve" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
1414
// "declaration": true, /* Generates corresponding '.d.ts' file. */
1515
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
1616
// "sourceMap": true, /* Generates corresponding '.map' file. */

0 commit comments

Comments
 (0)