From c55ec99b000eaaf7486ea9de892f29318f329b4c Mon Sep 17 00:00:00 2001 From: XiaoYan Li Date: Thu, 27 Sep 2018 05:03:31 +0800 Subject: [PATCH] Prevent Babel config overridden (#5109) --- config/jest/babelTransform.js | 1 + config/webpack.config.dev.js | 2 ++ config/webpack.config.prod.js | 2 ++ 3 files changed, 5 insertions(+) diff --git a/config/jest/babelTransform.js b/config/jest/babelTransform.js index 02742e90c6c..7feed94c59a 100644 --- a/config/jest/babelTransform.js +++ b/config/jest/babelTransform.js @@ -12,4 +12,5 @@ const babelJest = require('babel-jest'); module.exports = babelJest.createTransformer({ presets: [require.resolve('babel-preset-react-app')], babelrc: false, + configFile: false, }); diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index b5f3f136a65..5ca15c583aa 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -234,6 +234,7 @@ module.exports = { options: { // @remove-on-eject-begin babelrc: false, + configFile: false, presets: [require.resolve('babel-preset-react-app')], // Make sure we have a unique cache identifier, erring on the // side of caution. @@ -289,6 +290,7 @@ module.exports = { loader: require.resolve('babel-loader'), options: { babelrc: false, + configFile: false, compact: false, presets: [ [ diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index ac2705e0ba7..2bca9e65f98 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -275,6 +275,7 @@ module.exports = { options: { // @remove-on-eject-begin babelrc: false, + configFile: false, presets: [require.resolve('babel-preset-react-app')], // Make sure we have a unique cache identifier, erring on the // side of caution. @@ -323,6 +324,7 @@ module.exports = { loader: require.resolve('babel-loader'), options: { babelrc: false, + configFile: false, compact: false, presets: [ [