1234567891011121314151617181920212223 |
- const plugins = [
- '@babel/plugin-syntax-dynamic-import',
- '@babel/plugin-transform-runtime'
- ]
- if (process.env.NODE_ENV === 'production') {
- plugins.push('transform-remove-console')
- }
- module.exports = {
- presets: [
- [
- '@vue/cli-plugin-babel/preset',
- {
- useBuiltIns: 'entry', // 推荐使用 'entry' 而非 'usage' 确保完全覆盖
- corejs: 3, // 使用 core-js@3 版本
- targets: {
- ie: '11' // 明确指定 IE11 为目标
- }
- }
- ]
- ],
- plugins
- }
|