Skip to content

Commit ac4267a

Browse files
committed
Add babel plugin to support code-splitting
1 parent 96fc9e8 commit ac4267a

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
}],
99
"stage-2"
1010
],
11-
"plugins": ["transform-runtime"],
11+
"plugins": ["transform-runtime", "dynamic-import-node"],
1212
"env": {
1313
"test": {
1414
"presets": ["env", "stage-2"],

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"babel-eslint": "^7.0.0",
5353
"babel-jest": "^21.0.2",
5454
"babel-loader": "^7.0.0",
55+
"babel-plugin-dynamic-import-node": "^1.1.0",
5556
"babel-plugin-module-resolver": "^2.7.1",
5657
"babel-plugin-transform-runtime": "^6.0.0",
5758
"babel-preset-env": "^1.6.0",

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,14 @@ babel-plugin-check-es2015-constants@^6.22.0:
461461
dependencies:
462462
babel-runtime "^6.22.0"
463463

464+
babel-plugin-dynamic-import-node@^1.1.0:
465+
version "1.1.0"
466+
resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-1.1.0.tgz#bd1d88ac7aaf98df4917c384373b04d971a2b37a"
467+
dependencies:
468+
babel-plugin-syntax-dynamic-import "^6.18.0"
469+
babel-template "^6.26.0"
470+
babel-types "^6.26.0"
471+
464472
babel-plugin-istanbul@^4.0.0:
465473
version "4.1.5"
466474
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e"

0 commit comments

Comments
 (0)