mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-11-22 02:23:37 +08:00
feat: 搜索用户和用户详情 搭建
This commit is contained in:
@@ -1,33 +1,33 @@
|
||||
import { cdn } from "./cdn";
|
||||
import { resolve } from "path";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import { viteBuildInfo } from "./info";
|
||||
import svgLoader from "vite-svg-loader";
|
||||
import vueJsx from "@vitejs/plugin-vue-jsx";
|
||||
import { viteMockServe } from "vite-plugin-mock";
|
||||
import { configCompressPlugin } from "./compress";
|
||||
import { cdn } from './cdn'
|
||||
import { resolve } from 'path'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import { viteBuildInfo } from './info'
|
||||
import svgLoader from 'vite-svg-loader'
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||
// import { viteMockServe } from 'vite-plugin-mock'
|
||||
import { configCompressPlugin } from './compress'
|
||||
// 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 VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite";
|
||||
import DefineOptions from "unplugin-vue-define-options/vite";
|
||||
import { genScssMultipleScopeVars } from "../src/layout/theme";
|
||||
import { visualizer } from 'rollup-plugin-visualizer'
|
||||
import removeConsole from 'vite-plugin-remove-console'
|
||||
import themePreprocessorPlugin from '@pureadmin/theme'
|
||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
|
||||
import DefineOptions from 'unplugin-vue-define-options/vite'
|
||||
import { genScssMultipleScopeVars } from '../src/layout/theme'
|
||||
|
||||
export function getPluginsList(
|
||||
command: string,
|
||||
VITE_CDN: boolean,
|
||||
VITE_COMPRESSION: ViteCompression
|
||||
) {
|
||||
const prodMock = true;
|
||||
const lifecycle = process.env.npm_lifecycle_event;
|
||||
const prodMock = true
|
||||
const lifecycle = process.env.npm_lifecycle_event
|
||||
return [
|
||||
vue(),
|
||||
// https://github.com/intlify/bundle-tools/tree/main/packages/vite-plugin-vue-i18n
|
||||
VueI18nPlugin({
|
||||
runtimeOnly: true,
|
||||
compositionOnly: true,
|
||||
include: [resolve("locales/**")]
|
||||
include: [resolve('locales/**')]
|
||||
}),
|
||||
// jsx、tsx语法支持
|
||||
vueJsx(),
|
||||
@@ -35,7 +35,7 @@ export function getPluginsList(
|
||||
configCompressPlugin(VITE_COMPRESSION),
|
||||
DefineOptions(),
|
||||
// 线上环境删除console
|
||||
removeConsole({ external: ["src/assets/iconfont/iconfont.js"] }),
|
||||
removeConsole({ external: ['src/assets/iconfont/iconfont.js'] }),
|
||||
viteBuildInfo(),
|
||||
// 自定义主题
|
||||
themePreprocessorPlugin({
|
||||
@@ -48,19 +48,19 @@ export function getPluginsList(
|
||||
svgLoader(),
|
||||
// ElementPlus({}),
|
||||
// mock支持
|
||||
viteMockServe({
|
||||
mockPath: "mock",
|
||||
localEnabled: command === "serve",
|
||||
prodEnabled: command !== "serve" && prodMock,
|
||||
injectCode: `
|
||||
import { setupProdMockServer } from './mockProdServer';
|
||||
setupProdMockServer();
|
||||
`,
|
||||
logger: false
|
||||
}),
|
||||
// viteMockServe({
|
||||
// mockPath: 'mock',
|
||||
// localEnabled: command === 'serve',
|
||||
// prodEnabled: command !== 'serve' && prodMock,
|
||||
// injectCode: `
|
||||
// import { setupProdMockServer } from './mockProdServer';
|
||||
// setupProdMockServer();
|
||||
// `,
|
||||
// logger: false
|
||||
// }),
|
||||
// 打包分析
|
||||
lifecycle === "report"
|
||||
? visualizer({ open: true, brotliSize: true, filename: "report.html" })
|
||||
lifecycle === 'report'
|
||||
? visualizer({ open: true, brotliSize: true, filename: 'report.html' })
|
||||
: null
|
||||
];
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user