|
@@ -27,6 +27,8 @@ import AutoImport from "unplugin-auto-import/vite";
|
|
|
|
|
|
import setting from "./src/settings";
|
|
|
|
|
|
+import legacyPlugin from '@vitejs/plugin-legacy'
|
|
|
+
|
|
|
const prodMock = setting.openProdMock;
|
|
|
// import packageJson from './package.json'
|
|
|
// import { loadEnv } from 'vite'
|
|
@@ -71,6 +73,10 @@ export default ({ command, mode }: any) => {
|
|
|
strictPort: true,
|
|
|
},
|
|
|
plugins: [
|
|
|
+ legacyPlugin({
|
|
|
+ targets:['chrome 51','chrome 52','chrome 53','chrome 54'], // 需要兼容的目标列表,可以设置多个
|
|
|
+ additionalLegacyPolyfills:['regenerator-runtime/runtime'] // 面向IE11时需要此插件
|
|
|
+ }),
|
|
|
vue({ reactivityTransform: true }),
|
|
|
// Icons({
|
|
|
// autoInstall: true,
|