Commit 341d2ae8 authored by Joel Collins's avatar Joel Collins
Browse files

Allow package version to be used in application

parent 1d6ae5c9
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
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: ''