chore: update

This commit is contained in:
xiaoxian521
2023-11-16 22:01:20 +08:00
parent 8d5766c1cc
commit 86f4775459
7 changed files with 517 additions and 270 deletions

View File

@@ -3,6 +3,7 @@ import { resolve } from "path";
import vue from "@vitejs/plugin-vue";
import { viteBuildInfo } from "./info";
import svgLoader from "vite-svg-loader";
import type { PluginOption } from "vite";
import vueJsx from "@vitejs/plugin-vue-jsx";
import { configCompressPlugin } from "./compress";
import { visualizer } from "rollup-plugin-visualizer";
@@ -13,10 +14,9 @@ import { genScssMultipleScopeVars } from "../src/layout/theme";
import { vitePluginFakeServer } from "vite-plugin-fake-server";
export function getPluginsList(
command: string,
VITE_CDN: boolean,
VITE_COMPRESSION: ViteCompression
) {
): PluginOption[] {
const lifecycle = process.env.npm_lifecycle_event;
return [
vue(),
@@ -51,6 +51,6 @@ export function getPluginsList(
// 打包分析
lifecycle === "report"
? visualizer({ open: true, brotliSize: true, filename: "report.html" })
: null
: (null as any)
];
}