diff --git a/KenticoInspector.WebApplication/ClientApp/package.json b/KenticoInspector.WebApplication/ClientApp/package.json
index d245a46a..6cebe8db 100644
--- a/KenticoInspector.WebApplication/ClientApp/package.json
+++ b/KenticoInspector.WebApplication/ClientApp/package.json
@@ -1,6 +1,6 @@
{
"name": "ClientApp",
- "version": "0.1.0",
+ "version": "4.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
diff --git a/KenticoInspector.WebApplication/ClientApp/src/app.vue b/KenticoInspector.WebApplication/ClientApp/src/app.vue
index 7b78d905..af67f0d3 100644
--- a/KenticoInspector.WebApplication/ClientApp/src/app.vue
+++ b/KenticoInspector.WebApplication/ClientApp/src/app.vue
@@ -18,7 +18,7 @@
Source on Github
mdi-github-box
-
Version 4.0.0
+ {{ $store.getters.appVersion }}
diff --git a/KenticoInspector.WebApplication/ClientApp/src/store/index.js b/KenticoInspector.WebApplication/ClientApp/src/store/index.js
index 3fc9c63a..c5f57da9 100644
--- a/KenticoInspector.WebApplication/ClientApp/src/store/index.js
+++ b/KenticoInspector.WebApplication/ClientApp/src/store/index.js
@@ -14,5 +14,13 @@ export default new Vuex.Store({
instances,
reports
},
+ state: {
+ packageVersion: process.env.PACKAGE_VERSION || '0'
+ },
+ getters: {
+ appVersion: (state) => {
+ return state.packageVersion
+ }
+ },
strict: debug
})
\ No newline at end of file
diff --git a/KenticoInspector.WebApplication/ClientApp/vue.config.js b/KenticoInspector.WebApplication/ClientApp/vue.config.js
index e58944c5..281c25a2 100644
--- a/KenticoInspector.WebApplication/ClientApp/vue.config.js
+++ b/KenticoInspector.WebApplication/ClientApp/vue.config.js
@@ -1,3 +1,16 @@
+const fs = require('fs')
+const webpack = require('webpack')
+const packageJson = fs.readFileSync('./package.json')
+const version = JSON.parse(packageJson).version || 0
module.exports = {
- lintOnSave: undefined
+ configureWebpack: {
+ plugins: [
+ new webpack.DefinePlugin({
+ 'process.env': {
+ PACKAGE_VERSION: '"' + version + '"'
+ }
+ })
+ ]
+ },
+ lintOnSave: undefined
}
\ No newline at end of file