Skip to content

Commit

Permalink
add version to env directly
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbitronics committed May 3, 2024
1 parent 7c743a8 commit fdcf34d
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const webpack = require('webpack')
const version = require('./package.json').version
process.env.VUE_APP_VERSION = process.env.npm_package_version

module.exports = {
devServer: {
Expand All @@ -10,16 +9,4 @@ module.exports = {
port: 8000,
allowedHosts: [process.env.VUE_ALLOWED_HOSTS],
},

configureWebpack: (config) => {
return {
plugins: [
new webpack.DefinePlugin({
'process.env': {
VUE_APP_VERSION: `"` + version + `"`,
},
}),
],
}
},
}

0 comments on commit fdcf34d

Please sign in to comment.