Skip to content

Commit 2052198

Browse files
committed
chore: fix babel config
1 parent 2ac0189 commit 2052198

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

babel.config.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
11
module.exports = function (api) {
22
api.cache(true);
3-
const presets = ['razzle'];
3+
const presets = [
4+
[
5+
'razzle',
6+
{
7+
'@babel/preset-react': { runtime: 'automatic' },
8+
},
9+
],
10+
];
411
const plugins = [
12+
'lodash',
13+
'@babel/plugin-proposal-export-default-from', // Stage 1
14+
'@babel/plugin-syntax-export-namespace-from', // Stage 4
15+
'@babel/plugin-proposal-throw-expressions', // Stage 2
16+
'@babel/plugin-proposal-nullish-coalescing-operator', // Stage 4
517
[
618
'react-intl', // React Intl extractor, required for the whole i18n infrastructure to work
719
{
820
messagesDir: './build/messages/',
921
},
1022
],
23+
'@loadable/babel-plugin', // Required by the @loadable plugin
1124
];
1225

1326
return {

0 commit comments

Comments
 (0)