From af1e229945cbfd002fa7f40b769e946c5b0f2d7a Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 14 Feb 2019 10:37:42 +0100 Subject: [PATCH] support dynamic import --- babel.config.js | 2 ++ package.json | 2 ++ yarn.lock | 14 ++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/babel.config.js b/babel.config.js index d35cc679..f336bdba 100644 --- a/babel.config.js +++ b/babel.config.js @@ -18,6 +18,8 @@ module.exports = (api) => { '@babel/plugin-transform-flow-strip-types', '@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-object-rest-spread', + '@babel/plugin-syntax-dynamic-import', + 'dynamic-import-node', [ '@babel/plugin-transform-runtime', { diff --git a/package.json b/package.json index bffb8177..57d0a713 100644 --- a/package.json +++ b/package.json @@ -92,6 +92,7 @@ "@babel/core": "^7.2.2", "@babel/plugin-proposal-class-properties": "^7.3.0", "@babel/plugin-proposal-object-rest-spread": "^7.3.2", + "@babel/plugin-syntax-dynamic-import": "^7.2.0", "@babel/plugin-transform-flow-strip-types": "^7.2.3", "@babel/plugin-transform-runtime": "^7.2.0", "@babel/preset-env": "^7.3.1", @@ -101,6 +102,7 @@ "babel-eslint": "^10.0.1", "babel-jest": "^24.1.0", "babel-loader": "^8.0.5", + "babel-plugin-dynamic-import-node": "^2.2.0", "babel-plugin-module-resolver": "^3.1.3", "babel-plugin-react-intl": "^3.0.1", "babel-plugin-styled-components": "^1.10.0", diff --git a/yarn.lock b/yarn.lock index a0d5e5f3..715f8be3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -329,6 +329,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-dynamic-import@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz#69c159ffaf4998122161ad8ebc5e6d1f55df8612" + integrity sha512-mVxuJ0YroI/h/tbFTPGZR8cv6ai+STMKNBq0f8hFxsxWjl94qqhsb+wXbpNMDPU3cfR1TIsVFzU3nXyZMqyK4w== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-flow@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.2.0.tgz#a765f061f803bc48f240c26f8747faf97c26bf7c" @@ -1719,6 +1726,13 @@ babel-plugin-check-es2015-constants@^6.22.0: dependencies: babel-runtime "^6.22.0" +babel-plugin-dynamic-import-node@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.2.0.tgz#c0adfb07d95f4a4495e9aaac6ec386c4d7c2524e" + integrity sha512-fP899ELUnTaBcIzmrW7nniyqqdYWrWuJUyPWHxFa/c7r7hS6KC8FscNfLlBNIoPSc55kYMGEEKjPjJGCLbE1qA== + dependencies: + object.assign "^4.1.0" + babel-plugin-emotion@^9.2.11: version "9.2.11" resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-9.2.11.tgz#319c005a9ee1d15bb447f59fe504c35fd5807728"