chore: 删除 @vitejs/plugin-legacyvue3 无法通过任何工具使其支持ie

This commit is contained in:
xiaoxian521
2022-11-17 22:11:13 +08:00
parent 5c82fdcd0f
commit 2235d9d7a8
11 changed files with 248 additions and 308 deletions

View File

@@ -5,7 +5,6 @@ const warpperEnv = (envConf: Recordable): ViteEnv => {
VITE_PORT: 8848,
VITE_PUBLIC_PATH: "",
VITE_ROUTER_HISTORY: "",
VITE_LEGACY: false,
VITE_CDN: false,
VITE_COMPRESSION: "none"
};

View File

@@ -3,7 +3,6 @@ import { resolve } from "path";
import vue from "@vitejs/plugin-vue";
import { viteBuildInfo } from "./info";
import svgLoader from "vite-svg-loader";
import legacy from "@vitejs/plugin-legacy";
import vueJsx from "@vitejs/plugin-vue-jsx";
import VueMacros from "unplugin-vue-macros/vite";
import { viteMockServe } from "vite-plugin-mock";
@@ -16,7 +15,6 @@ import { genScssMultipleScopeVars } from "../src/layout/theme";
export function getPluginsList(
command: string,
VITE_LEGACY: boolean,
VITE_CDN: boolean,
VITE_COMPRESSION: ViteCompression
) {
@@ -65,13 +63,6 @@ export function getPluginsList(
`,
logger: false
}),
// 是否为打包后的文件提供传统浏览器兼容性支持
VITE_LEGACY
? legacy({
targets: ["ie >= 11"],
additionalLegacyPolyfills: ["regenerator-runtime/runtime"]
})
: null,
// 打包分析
lifecycle === "report"
? visualizer({ open: true, brotliSize: true, filename: "report.html" })