Skip to content

Commit 45de75a

Browse files
committed
fix: fix dynamic import issue
1 parent 27e8bde commit 45de75a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

babel.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
module.exports = {
22
presets: [
33
'@babel/preset-react',
4-
['@babel/preset-env', { loose: true, targets: { node: 8 } }],
4+
[
5+
'@babel/preset-env',
6+
{ modules: false, loose: true, targets: { node: 8 } },
7+
],
58
],
69
plugins: [
710
'@loadable/babel-plugin',
11+
'@babel/plugin-transform-modules-commonjs',
812
'@babel/plugin-proposal-class-properties',
913
],
1014
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"@babel/cli": "^7.5.5",
1818
"@babel/core": "^7.5.5",
1919
"@babel/plugin-proposal-class-properties": "^7.5.5",
20+
"@babel/plugin-transform-modules-commonjs": "^7.5.0",
2021
"@babel/preset-env": "^7.5.5",
2122
"@babel/preset-react": "^7.0.0",
2223
"@loadable/babel-plugin": "^5.10.0",

0 commit comments

Comments
 (0)