mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-30 00:41:12 -05:00
f5f4de0aa3
Currently, 3 options are implemented: - options.prune (defaults to `false`) - Remove null or undefined fields from the object after merging. - options.merge (defaults to `true`) deep-merge nested fields, note that dependency fields are always deep merged regardless of this option. - options.warnIncompatibleVersions (defaults to `true`) Output warning if two dependency version ranges don't intersect. Closes #4779
25 lines
716 B
JavaScript
25 lines
716 B
JavaScript
const { chalk } = require('@vue/cli-shared-utils')
|
|
|
|
module.exports = api => {
|
|
api.transformScript(
|
|
'babel.config.js',
|
|
require('../codemods/usePluginPreset')
|
|
)
|
|
|
|
if (api.fromVersion('^3')) {
|
|
api.extendPackage(
|
|
{
|
|
dependencies: {
|
|
'core-js': '^3.6.4'
|
|
}
|
|
},
|
|
{ warnIncompatibleVersions: false }
|
|
)
|
|
|
|
// TODO: implement a codemod to migrate polyfills
|
|
api.exitLog(`core-js has been upgraded from v2 to v3.
|
|
If you have any custom polyfills defined in ${chalk.yellow('babel.config.js')}, please be aware their names may have been changed.
|
|
For more complete changelog, see https://github.com/zloirock/core-js/blob/master/CHANGELOG.md#300---20190319`)
|
|
}
|
|
}
|