Skip to content

Commit cd5f404

Browse files
authored
fix(babel-migrator): transform babel preset regardless of plugin version (#4633)
1 parent d49f784 commit cd5f404

File tree

1 file changed

+2
-2
lines changed
  • packages/@vue/cli-plugin-babel/migrator

1 file changed

+2
-2
lines changed

packages/@vue/cli-plugin-babel/migrator/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
const { chalk } = require('@vue/cli-shared-utils')
22

33
module.exports = (api) => {
4+
api.transformScript('babel.config.js', require('../codemods/usePluginPreset'))
5+
46
if (api.fromVersion('^3')) {
57
api.extendPackage({
68
dependencies: {
79
'core-js': '^3.1.2'
810
}
911
}, true)
1012

11-
api.transformScript('babel.config.js', require('../codemods/usePluginPreset'))
12-
1313
// TODO: implement a codemod to migrate polyfills
1414
api.exitLog(`core-js has been upgraded from v2 to v3.
1515
If you have any custom polyfills defined in ${chalk.yellow('babael.config.js')}, please be aware their names may have been changed.

0 commit comments

Comments
 (0)