mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
chore: update
This commit is contained in:
@@ -4,7 +4,7 @@ import pkg from "./package.json";
|
||||
import { warpperEnv } from "./build";
|
||||
import { getPluginsList } from "./build/plugins";
|
||||
import { include, exclude } from "./build/optimize";
|
||||
import { UserConfigExport, ConfigEnv, loadEnv } from "vite";
|
||||
import { type UserConfigExport, type ConfigEnv, loadEnv } from "vite";
|
||||
|
||||
/** 当前执行node命令时文件夹的地址(工作目录) */
|
||||
const root: string = process.cwd();
|
||||
@@ -26,7 +26,7 @@ const __APP_INFO__ = {
|
||||
lastBuildTime: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss")
|
||||
};
|
||||
|
||||
export default ({ command, mode }: ConfigEnv): UserConfigExport => {
|
||||
export default ({ mode }: ConfigEnv): UserConfigExport => {
|
||||
const { VITE_CDN, VITE_PORT, VITE_COMPRESSION, VITE_PUBLIC_PATH } =
|
||||
warpperEnv(loadEnv(mode, root));
|
||||
return {
|
||||
@@ -47,7 +47,7 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
|
||||
clientFiles: ["./index.html", "./src/{views,components}/*"]
|
||||
}
|
||||
},
|
||||
plugins: getPluginsList(command, VITE_CDN, VITE_COMPRESSION),
|
||||
plugins: getPluginsList(VITE_CDN, VITE_COMPRESSION),
|
||||
// https://cn.vitejs.dev/config/dep-optimization-options.html#dep-optimization-options
|
||||
optimizeDeps: {
|
||||
include,
|
||||
|
||||
Reference in New Issue
Block a user