perf: 同步完整版代码
This commit is contained in:
@@ -6,12 +6,12 @@ import legacy from "@vitejs/plugin-legacy";
|
||||
import vueJsx from "@vitejs/plugin-vue-jsx";
|
||||
import WindiCSS from "vite-plugin-windicss";
|
||||
import { viteMockServe } from "vite-plugin-mock";
|
||||
import liveReload from "vite-plugin-live-reload";
|
||||
import VueI18n from "@intlify/vite-plugin-vue-i18n";
|
||||
import ElementPlus from "unplugin-element-plus/vite";
|
||||
import { visualizer } from "rollup-plugin-visualizer";
|
||||
import removeConsole from "vite-plugin-remove-console";
|
||||
import themePreprocessorPlugin from "@pureadmin/theme";
|
||||
import { genScssMultipleScopeVars } from "/@/layout/theme";
|
||||
|
||||
export function getPluginsList(command, VITE_LEGACY) {
|
||||
const prodMock = true;
|
||||
@@ -30,49 +30,10 @@ export function getPluginsList(command, VITE_LEGACY) {
|
||||
// 线上环境删除console
|
||||
removeConsole(),
|
||||
viteBuildInfo(),
|
||||
// 修改layout文件夹下的文件时自动重载浏览器 解决 https://github.com/xiaoxian521/vue-pure-admin/issues/170
|
||||
liveReload(["src/layout/**/*", "src/router/**/*"]),
|
||||
// 自定义主题
|
||||
themePreprocessorPlugin({
|
||||
scss: {
|
||||
multipleScopeVars: [
|
||||
{
|
||||
scopeName: "layout-theme-default",
|
||||
path: "src/layout/theme/default-vars.scss"
|
||||
},
|
||||
{
|
||||
scopeName: "layout-theme-light",
|
||||
path: "src/layout/theme/light-vars.scss"
|
||||
},
|
||||
{
|
||||
scopeName: "layout-theme-dusk",
|
||||
path: "src/layout/theme/dusk-vars.scss"
|
||||
},
|
||||
{
|
||||
scopeName: "layout-theme-volcano",
|
||||
path: "src/layout/theme/volcano-vars.scss"
|
||||
},
|
||||
{
|
||||
scopeName: "layout-theme-yellow",
|
||||
path: "src/layout/theme/yellow-vars.scss"
|
||||
},
|
||||
{
|
||||
scopeName: "layout-theme-mingQing",
|
||||
path: "src/layout/theme/mingQing-vars.scss"
|
||||
},
|
||||
{
|
||||
scopeName: "layout-theme-auroraGreen",
|
||||
path: "src/layout/theme/auroraGreen-vars.scss"
|
||||
},
|
||||
{
|
||||
scopeName: "layout-theme-pink",
|
||||
path: "src/layout/theme/pink-vars.scss"
|
||||
},
|
||||
{
|
||||
scopeName: "layout-theme-saucePurple",
|
||||
path: "src/layout/theme/saucePurple-vars.scss"
|
||||
}
|
||||
],
|
||||
multipleScopeVars: genScssMultipleScopeVars(),
|
||||
// 默认取 multipleScopeVars[0].scopeName
|
||||
defaultScopeName: "",
|
||||
// 在生产模式是否抽取独立的主题css文件,extract为true以下属性有效
|
||||
|
Reference in New Issue
Block a user