fix(build): fix build error
This commit is contained in:
parent
b54b794264
commit
6d6e0a1bfe
|
|
@ -26,7 +26,7 @@
|
||||||
name: 'AboutPage',
|
name: 'AboutPage',
|
||||||
components: { Description, PageWrapper },
|
components: { Description, PageWrapper },
|
||||||
setup() {
|
setup() {
|
||||||
const { pkg, lastBuildTime } = window.__APP_INFO__;
|
const { pkg, lastBuildTime } = __APP_INFO__;
|
||||||
|
|
||||||
const { dependencies, devDependencies, name, version } = pkg;
|
const { dependencies, devDependencies, name, version } = pkg;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,19 +7,18 @@ import type {
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
declare interface __APP_INFO__ {
|
||||||
|
pkg: {
|
||||||
|
name: string;
|
||||||
|
version: string;
|
||||||
|
dependencies: Recordable<string>;
|
||||||
|
devDependencies: Recordable<string>;
|
||||||
|
};
|
||||||
|
lastBuildTime: string;
|
||||||
|
}
|
||||||
declare interface Window {
|
declare interface Window {
|
||||||
// Global vue app instance
|
// Global vue app instance
|
||||||
__APP__: App<Element>;
|
__APP__: App<Element>;
|
||||||
|
|
||||||
__APP_INFO__: {
|
|
||||||
pkg: {
|
|
||||||
name: string;
|
|
||||||
version: string;
|
|
||||||
dependencies: Recordable<string>;
|
|
||||||
devDependencies: Recordable<string>;
|
|
||||||
};
|
|
||||||
lastBuildTime: string;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// vue
|
// vue
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,9 @@ import { OUTPUT_DIR } from './build/constant';
|
||||||
import pkg from './package.json';
|
import pkg from './package.json';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
|
const { dependencies, devDependencies, name, version } = pkg;
|
||||||
const APP_INFO = {
|
const APP_INFO = {
|
||||||
pkg,
|
pkg: { dependencies, devDependencies, name, version },
|
||||||
lastBuildTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
lastBuildTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue