diff --git a/packages/babel-preset-react-app/create.js b/packages/babel-preset-react-app/create.js index 17a5319388e..cdf94a63243 100644 --- a/packages/babel-preset-react-app/create.js +++ b/packages/babel-preset-react-app/create.js @@ -158,7 +158,7 @@ module.exports = function(api, opts, env) { require('@babel/plugin-syntax-dynamic-import').default, isEnvTest && // Transform dynamic import to require - require('babel-plugin-transform-dynamic-import').default, + require('babel-plugin-dynamic-import-node'), ].filter(Boolean), }; }; diff --git a/packages/babel-preset-react-app/package.json b/packages/babel-preset-react-app/package.json index e2d52cd92d2..7f2e741650c 100644 --- a/packages/babel-preset-react-app/package.json +++ b/packages/babel-preset-react-app/package.json @@ -31,8 +31,8 @@ "@babel/preset-react": "7.0.0", "@babel/runtime": "7.0.0", "babel-loader": "8.0.4", + "babel-plugin-dynamic-import-node": "2.2.0", "babel-plugin-macros": "2.4.2", - "babel-plugin-transform-dynamic-import": "2.1.0", "babel-plugin-transform-react-remove-prop-types": "0.4.18" } }