diff --git a/packages/webpack/src/config/base.js b/packages/webpack/src/config/base.js index 456bd8dee5..39ce9cb9d5 100644 --- a/packages/webpack/src/config/base.js +++ b/packages/webpack/src/config/base.js @@ -124,6 +124,8 @@ export default class WebpackBaseConfig { } catch (_err) { corejsVersion = 2 } + } else { + corejsVersion = Number.parseInt(corejsVersion) } if (![2, 3].includes(corejsVersion)) {