mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-23 17:50:25 +08:00
fix(build): fix build error
This commit is contained in:
parent
b54b794264
commit
6d6e0a1bfe
@ -26,7 +26,7 @@
|
||||
name: 'AboutPage',
|
||||
components: { Description, PageWrapper },
|
||||
setup() {
|
||||
const { pkg, lastBuildTime } = window.__APP_INFO__;
|
||||
const { pkg, lastBuildTime } = __APP_INFO__;
|
||||
|
||||
const { dependencies, devDependencies, name, version } = pkg;
|
||||
|
||||
|
19
types/global.d.ts
vendored
19
types/global.d.ts
vendored
@ -7,19 +7,18 @@ import type {
|
||||
} from 'vue';
|
||||
|
||||
declare global {
|
||||
declare interface __APP_INFO__ {
|
||||
pkg: {
|
||||
name: string;
|
||||
version: string;
|
||||
dependencies: Recordable<string>;
|
||||
devDependencies: Recordable<string>;
|
||||
};
|
||||
lastBuildTime: string;
|
||||
}
|
||||
declare interface Window {
|
||||
// Global vue app instance
|
||||
__APP__: App<Element>;
|
||||
|
||||
__APP_INFO__: {
|
||||
pkg: {
|
||||
name: string;
|
||||
version: string;
|
||||
dependencies: Recordable<string>;
|
||||
devDependencies: Recordable<string>;
|
||||
};
|
||||
lastBuildTime: string;
|
||||
};
|
||||
}
|
||||
|
||||
// vue
|
||||
|
@ -12,8 +12,9 @@ import { OUTPUT_DIR } from './build/constant';
|
||||
import pkg from './package.json';
|
||||
import moment from 'moment';
|
||||
|
||||
const { dependencies, devDependencies, name, version } = pkg;
|
||||
const APP_INFO = {
|
||||
pkg,
|
||||
pkg: { dependencies, devDependencies, name, version },
|
||||
lastBuildTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user