From 6aedc5bc6c298195fdefe4f7a98d5939b9ba7d25 Mon Sep 17 00:00:00 2001 From: Chris Breiding Date: Thu, 17 Jun 2021 09:36:09 -0400 Subject: [PATCH] fix(webpack-batteries-included-preprocessor): disable loading babel config files --- .../babel.config.json | 6 ++++++ npm/webpack-batteries-included-preprocessor/index.js | 2 ++ .../test/fixtures/.babelrc | 6 ++++++ 3 files changed, 14 insertions(+) create mode 100644 npm/webpack-batteries-included-preprocessor/babel.config.json create mode 100644 npm/webpack-batteries-included-preprocessor/test/fixtures/.babelrc diff --git a/npm/webpack-batteries-included-preprocessor/babel.config.json b/npm/webpack-batteries-included-preprocessor/babel.config.json new file mode 100644 index 000000000000..566ae4b326f5 --- /dev/null +++ b/npm/webpack-batteries-included-preprocessor/babel.config.json @@ -0,0 +1,6 @@ +{ + "__description__": "This is here to prove that babel.config.json does not get used by babel-loader. It's not used for the compilation of this project.", + "plugins": [ + "doesnt-exist" + ] +} diff --git a/npm/webpack-batteries-included-preprocessor/index.js b/npm/webpack-batteries-included-preprocessor/index.js index c978f4217c31..f2133038b41b 100644 --- a/npm/webpack-batteries-included-preprocessor/index.js +++ b/npm/webpack-batteries-included-preprocessor/index.js @@ -97,6 +97,8 @@ const getDefaultWebpackOptions = () => { [require.resolve('@babel/preset-env'), { modules: 'commonjs', targets: { 'chrome': '64' } }], require.resolve('@babel/preset-react'), ], + configFile: false, + babelrc: false, }, }], }, { diff --git a/npm/webpack-batteries-included-preprocessor/test/fixtures/.babelrc b/npm/webpack-batteries-included-preprocessor/test/fixtures/.babelrc new file mode 100644 index 000000000000..0fce3eb27633 --- /dev/null +++ b/npm/webpack-batteries-included-preprocessor/test/fixtures/.babelrc @@ -0,0 +1,6 @@ +{ + "__description__": "This is here to prove that .babelrc does not get used by babel-loader. It's not used for the compilation of this project.", + "plugins": [ + "doesnt-exist" + ] +}