fix(babel): not override presets if babelrc is true (#7297)

This commit is contained in:
Xin Du (Clark) 2020-05-01 13:23:08 +01:00 committed by GitHub
parent 8538368837
commit ab3ff4de00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,7 +98,7 @@ export default class WebpackBaseConfig {
envName envName
} }
if (options.configFile !== false) { if (options.configFile || options.babelrc) {
return options return options
} }
@ -114,7 +114,7 @@ export default class WebpackBaseConfig {
) )
} }
if (!options.babelrc && !options.presets) { if (!options.presets) {
options.presets = [defaultPreset] options.presets = [defaultPreset]
} }