UNPKG

649 BJavaScriptView Raw
1const { chalk } = require('@vue/cli-shared-utils')
2
3module.exports = (api) => {
4 api.transformScript('babel.config.js', require('../codemods/usePluginPreset'))
5
6 if (api.fromVersion('^3')) {
7 api.extendPackage({
8 dependencies: {
9 'core-js': '^3.1.2'
10 }
11 }, true)
12
13 // TODO: implement a codemod to migrate polyfills
14 api.exitLog(`core-js has been upgraded from v2 to v3.
15If you have any custom polyfills defined in ${chalk.yellow('babel.config.js')}, please be aware their names may have been changed.
16For more complete changelog, see https://github.com/zloirock/core-js/blob/master/CHANGELOG.md#300---20190319`)
17 }
18}