From ab3ff4de0072a9f8678a736b293744af928496f8 Mon Sep 17 00:00:00 2001 From: "Xin Du (Clark)" Date: Fri, 1 May 2020 13:23:08 +0100 Subject: [PATCH] fix(babel): not override presets if babelrc is true (#7297) --- packages/webpack/src/config/base.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/webpack/src/config/base.js b/packages/webpack/src/config/base.js index f494cb3a6b..4c699a419d 100644 --- a/packages/webpack/src/config/base.js +++ b/packages/webpack/src/config/base.js @@ -98,7 +98,7 @@ export default class WebpackBaseConfig { envName } - if (options.configFile !== false) { + if (options.configFile || options.babelrc) { return options } @@ -114,7 +114,7 @@ export default class WebpackBaseConfig { ) } - if (!options.babelrc && !options.presets) { + if (!options.presets) { options.presets = [defaultPreset] }