You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					25 lines
				
				716 B
			
		
		
			
		
	
	
					25 lines
				
				716 B
			| 
								 
											4 years ago
										 
									 | 
							
								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.5'
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								      },
							 | 
						||
| 
								 | 
							
								      { 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`)
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								}
							 |