mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-15 14:03:36 +08:00
feat: add about page
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import dayjs from "dayjs";
|
||||
import { resolve } from "path";
|
||||
import pkg from "./package.json";
|
||||
import { warpperEnv, regExps } from "./build";
|
||||
import { getPluginsList } from "./build/plugins";
|
||||
import { UserConfigExport, ConfigEnv, loadEnv } from "vite";
|
||||
@@ -19,6 +21,12 @@ const alias: Record<string, string> = {
|
||||
"vue-i18n": "vue-i18n/dist/vue-i18n.cjs.js"
|
||||
};
|
||||
|
||||
const { dependencies, devDependencies, name, version } = pkg;
|
||||
const __APP_INFO__ = {
|
||||
pkg: { dependencies, devDependencies, name, version },
|
||||
lastBuildTime: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss")
|
||||
};
|
||||
|
||||
export default ({ command, mode }: ConfigEnv): UserConfigExport => {
|
||||
const {
|
||||
VITE_PORT,
|
||||
@@ -92,7 +100,8 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
|
||||
chunkSizeWarningLimit: 2000
|
||||
},
|
||||
define: {
|
||||
__INTLIFY_PROD_DEVTOOLS__: false
|
||||
__INTLIFY_PROD_DEVTOOLS__: false,
|
||||
__APP_INFO__: JSON.stringify(__APP_INFO__)
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user