|
@@ -1,9 +1,9 @@
|
|
|
import vue from '@vitejs/plugin-vue';
|
|
|
-import legacy from '@vitejs/plugin-legacy';
|
|
|
import createUnoCss from './unocss';
|
|
|
import createAutoImport from './auto-import';
|
|
|
import createComponents from './components';
|
|
|
import createIcons from './icons';
|
|
|
+import createLegacy from './legacy';
|
|
|
import createSvgIconsPlugin from './svg-icon';
|
|
|
import createCompression from './compression';
|
|
|
import createSetupExtend from './setup-extend';
|
|
@@ -23,37 +23,6 @@ export default (viteEnv: any, isBuild = false): [] => {
|
|
|
vitePlugins.push(createSetupExtend());
|
|
|
vitePlugins.push(createI18n(path));
|
|
|
vitePlugins.push(ViteImageOptimizer());
|
|
|
- vitePlugins.push(
|
|
|
- legacy({
|
|
|
- targets: ['defaults', 'Chrome >= 51'],
|
|
|
- additionalLegacyPolyfills: [
|
|
|
- 'regenerator-runtime/runtime'
|
|
|
- ],
|
|
|
- renderLegacyChunks: true,
|
|
|
- polyfills: [
|
|
|
- 'es.symbol',
|
|
|
- 'es.array.filter',
|
|
|
- 'es.promise',
|
|
|
- 'es.promise.finally',
|
|
|
- 'es.object.assign',
|
|
|
- 'es.map',
|
|
|
- 'es.set',
|
|
|
- 'es.array.for-each',
|
|
|
- 'es.object.define-properties',
|
|
|
- 'es.object.define-property',
|
|
|
- 'es.object.get-own-property-descriptor',
|
|
|
- 'es.object.get-own-property-descriptors',
|
|
|
- 'es.object.keys',
|
|
|
- 'es.object.to-string',
|
|
|
- 'web.dom-collections.for-each',
|
|
|
- 'esnext.global-this',
|
|
|
- 'esnext.string.match-all',
|
|
|
- 'es.array.iterator',
|
|
|
- 'es.string.includes',
|
|
|
- 'es.string.starts-with',
|
|
|
- 'es.object.values',
|
|
|
- ]
|
|
|
- })
|
|
|
- );
|
|
|
+ vitePlugins.push(createLegacy());
|
|
|
return vitePlugins;
|
|
|
};
|