Skip to content

Commit

Permalink
Use babel-plugin-transform-dynamic-import instead of babel-plugin-dyn…
Browse files Browse the repository at this point in the history
…amic-import-node
  • Loading branch information
fiennyangeln committed Oct 7, 2018
1 parent fe25a31 commit b6221c9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 26 deletions.
2 changes: 1 addition & 1 deletion v2/lib/webpack/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = function createBaseConfig(props, isServer) {
.options({
babelrc: false,
presets: ['@babel/env', '@babel/react'],
plugins: [isServer ? 'dynamic-import-node' : 'syntax-dynamic-import'],
plugins: [isServer ? 'transform-dynamic-import' : 'syntax-dynamic-import'],
});
}

Expand Down
2 changes: 1 addition & 1 deletion v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@babel/preset-react": "^7.0.0",
"babel-jest": "^23.6.0",
"babel-loader": "^8.0.0",
"babel-plugin-dynamic-import-node": "^2.0.0",
"babel-plugin-transform-dynamic-import": "^2.1.0",
"chalk": "^2.4.1",
"chokidar": "^2.0.4",
"classnames": "^2.2.6",
Expand Down
47 changes: 23 additions & 24 deletions v2/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1207,13 +1207,6 @@ babel-messages@^6.23.0:
dependencies:
babel-runtime "^6.22.0"

babel-plugin-dynamic-import-node@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.0.0.tgz#d6fc3f6c5e3bdc34e49c15faca7ce069755c0a57"
dependencies:
babel-plugin-syntax-dynamic-import "^6.18.0"
object.assign "^4.1.0"

babel-plugin-istanbul@^4.1.6:
version "4.1.6"
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45"
Expand All @@ -1227,14 +1220,16 @@ babel-plugin-jest-hoist@^23.2.0:
version "23.2.0"
resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz#e61fae05a1ca8801aadee57a6d66b8cefaf44167"

babel-plugin-syntax-dynamic-import@^6.18.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da"

babel-plugin-syntax-object-rest-spread@^6.13.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5"

babel-plugin-transform-dynamic-import@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-dynamic-import/-/babel-plugin-transform-dynamic-import-2.1.0.tgz#3ce618dd983c072b6e2135f527d46092fb45d80e"
dependencies:
"@babel/plugin-syntax-dynamic-import" "^7.0.0"

babel-preset-jest@^23.2.0:
version "23.2.0"
resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46"
Expand Down Expand Up @@ -1454,12 +1449,12 @@ browserify-zlib@^0.2.0:
pako "~1.0.5"

browserslist@^4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.1.1.tgz#328eb4ff1215b12df6589e9ab82f8adaa4fc8cd6"
version "4.2.0"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.2.0.tgz#3e5e5edf7fa9758ded0885cf88c1e4be753a591c"
dependencies:
caniuse-lite "^1.0.30000884"
electron-to-chromium "^1.3.62"
node-releases "^1.0.0-alpha.11"
caniuse-lite "^1.0.30000889"
electron-to-chromium "^1.3.73"
node-releases "^1.0.0-alpha.12"

bser@^2.0.0:
version "2.0.0"
Expand Down Expand Up @@ -1575,9 +1570,9 @@ camelize@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b"

caniuse-lite@^1.0.30000884:
version "1.0.30000888"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000888.tgz#22edb50d91dd70612b5898e3b36f460600c6492f"
caniuse-lite@^1.0.30000889:
version "1.0.30000889"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000889.tgz#53e266c83e725ad3bd2e4a3ea76d5031a8aa4c3e"

capture-exit@^1.2.0:
version "1.2.0"
Expand Down Expand Up @@ -2344,9 +2339,9 @@ ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"

electron-to-chromium@^1.3.62:
version "1.3.72"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.72.tgz#b69683081d5b7eee6e1ea07b2f5fa30b3c72252d"
electron-to-chromium@^1.3.73:
version "1.3.75"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.75.tgz#dd04551739e7371862b0ac7f4ddaa9f3f95b7e68"

elliptic@^6.0.0:
version "6.4.0"
Expand Down Expand Up @@ -3134,10 +3129,14 @@ global-prefix@^1.0.1:
is-windows "^1.0.1"
which "^1.2.14"

globals@^11.0.1, globals@^11.1.0:
globals@^11.0.1:
version "11.7.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673"

globals@^11.1.0:
version "11.8.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.8.0.tgz#c1ef45ee9bed6badf0663c5cb90e8d1adec1321d"

globals@^9.18.0:
version "9.18.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
Expand Down Expand Up @@ -5071,7 +5070,7 @@ node-pre-gyp@^0.10.0:
semver "^5.3.0"
tar "^4"

node-releases@^1.0.0-alpha.11:
node-releases@^1.0.0-alpha.12:
version "1.0.0-alpha.12"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.0-alpha.12.tgz#32e461b879ea76ac674e511d9832cf29da345268"
dependencies:
Expand Down

0 comments on commit b6221c9

Please sign in to comment.