Allow package version to be used in application
This commit is contained in:
parent
1d6ae5c9da
commit
341d2ae845
1 changed files with 10 additions and 1 deletions
|
|
@ -1,3 +1,5 @@
|
|||
var webpack = require('webpack');
|
||||
|
||||
module.exports = {
|
||||
configureWebpack: config => {
|
||||
config.target = process.env.VUE_APP_TARGET || 'web',
|
||||
|
|
@ -8,7 +10,14 @@ module.exports = {
|
|||
}
|
||||
:{
|
||||
main: './src/main.js',
|
||||
}
|
||||
},
|
||||
config.plugins.push(
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
PACKAGE_VERSION: JSON.stringify(require('./package.json').version)
|
||||
}
|
||||
})
|
||||
)
|
||||
},
|
||||
outputDir: (process.env.VUE_APP_TARGET == 'electron-renderer') ? './app/dist' : './dist',
|
||||
publicPath: ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue