Add version console log
This commit is contained in:
parent
a4ec4c6790
commit
b210f63638
@ -52,6 +52,8 @@ if(splash) {
|
||||
});
|
||||
}
|
||||
|
||||
console.info(`LiveAtlas version ${store.state.version}`);
|
||||
|
||||
const app = createApp(App).use(store);
|
||||
|
||||
// app.config.performance = true;
|
||||
|
@ -25,6 +25,7 @@ import {
|
||||
import {DynmapProjection} from "@/leaflet/projection/DynmapProjection";
|
||||
|
||||
export type State = {
|
||||
version: string;
|
||||
configuration: DynmapServerConfig;
|
||||
messages: DynmapMessageConfig;
|
||||
components: DynmapComponentConfig;
|
||||
@ -55,6 +56,8 @@ export type State = {
|
||||
}
|
||||
|
||||
export const state: State = {
|
||||
version: process.env.PACKAGE_VERSION || 'Unknown',
|
||||
|
||||
configuration: {
|
||||
version: '',
|
||||
allowChat: false,
|
||||
|
@ -1,3 +1,9 @@
|
||||
const
|
||||
webpack = require('webpack'),
|
||||
fs = require('fs'),
|
||||
packageJson = fs.readFileSync('./package.json'),
|
||||
version = JSON.parse(packageJson).version || 'Unknown';
|
||||
|
||||
module.exports = {
|
||||
publicPath: '',
|
||||
assetsDir: 'live-atlas',
|
||||
@ -11,6 +17,16 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
|
||||
configureWebpack: {
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
PACKAGE_VERSION: '"' + version + '"'
|
||||
}
|
||||
})
|
||||
]
|
||||
},
|
||||
|
||||
chainWebpack: config => {
|
||||
config.plugin('html')
|
||||
.tap(args => {
|
||||
|
Loading…
Reference in New Issue
Block a user