From 539e46a1d77259898b7e70d778a5e43fc25edc2a Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Sun, 3 Dec 2017 17:18:12 -0500 Subject: [PATCH] Transform modules in test --- packages/babel-preset-react-app/index.js | 1 + packages/babel-preset-react-app/package.json | 1 + packages/react-scripts/fixtures/kitchensink/.babelrc | 4 ---- 3 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 packages/react-scripts/fixtures/kitchensink/.babelrc diff --git a/packages/babel-preset-react-app/index.js b/packages/babel-preset-react-app/index.js index 40949c687a0..02d24e497d5 100644 --- a/packages/babel-preset-react-app/index.js +++ b/packages/babel-preset-react-app/index.js @@ -102,6 +102,7 @@ module.exports = function(api, opts) { isEnvTest && // Transform dynamic import to require require('babel-plugin-transform-dynamic-import').default, + isEnvTest && require('@babel/plugin-transform-modules-commonjs'), ].filter(Boolean), }; }; diff --git a/packages/babel-preset-react-app/package.json b/packages/babel-preset-react-app/package.json index faab919c1f9..3155be175bf 100644 --- a/packages/babel-preset-react-app/package.json +++ b/packages/babel-preset-react-app/package.json @@ -15,6 +15,7 @@ "@babel/plugin-proposal-class-properties": "7.0.0-beta.34", "@babel/plugin-syntax-dynamic-import": "^7.0.0-beta.34", "@babel/plugin-transform-classes": "7.0.0-beta.34", + "@babel/plugin-transform-modules-commonjs": "^7.0.0-beta.34", "@babel/plugin-transform-react-constant-elements": "7.0.0-beta.34", "@babel/plugin-transform-react-display-name": "7.0.0-beta.34", "@babel/plugin-transform-react-jsx": "7.0.0-beta.34", diff --git a/packages/react-scripts/fixtures/kitchensink/.babelrc b/packages/react-scripts/fixtures/kitchensink/.babelrc deleted file mode 100644 index 0859e412a87..00000000000 --- a/packages/react-scripts/fixtures/kitchensink/.babelrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "presets": ["react-app"], - "plugins": ["@babel/plugin-transform-modules-commonjs"] -}