Skip to content

Commit 539e46a

Browse files
committed
Transform modules in test
1 parent 482abf2 commit 539e46a

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

packages/babel-preset-react-app/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ module.exports = function(api, opts) {
102102
isEnvTest &&
103103
// Transform dynamic import to require
104104
require('babel-plugin-transform-dynamic-import').default,
105+
isEnvTest && require('@babel/plugin-transform-modules-commonjs'),
105106
].filter(Boolean),
106107
};
107108
};

packages/babel-preset-react-app/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"@babel/plugin-proposal-class-properties": "7.0.0-beta.34",
1616
"@babel/plugin-syntax-dynamic-import": "^7.0.0-beta.34",
1717
"@babel/plugin-transform-classes": "7.0.0-beta.34",
18+
"@babel/plugin-transform-modules-commonjs": "^7.0.0-beta.34",
1819
"@babel/plugin-transform-react-constant-elements": "7.0.0-beta.34",
1920
"@babel/plugin-transform-react-display-name": "7.0.0-beta.34",
2021
"@babel/plugin-transform-react-jsx": "7.0.0-beta.34",

packages/react-scripts/fixtures/kitchensink/.babelrc

-4
This file was deleted.

0 commit comments

Comments
 (0)