Allow targeting different environments with deply. Add version string on the web App component.

This commit is contained in:
2019-05-19 01:28:02 -05:00
parent 4bc8c00c49
commit 30ced3ecfd
7 changed files with 22 additions and 6 deletions

View File

@@ -1,3 +1,10 @@
const merge = require('deepmerge');
const VERSION = {
'process.env': {
PM_VERSION: JSON.stringify(require('./package.json').version)
}
};
module.exports = {
devServer: {
proxy: {
@@ -17,5 +24,11 @@ module.exports = {
analyzerMode: 'static',
openAnalyzer: false
}
},
chainWebpack: config => {
config
.plugin('define')
.tap(args => merge(args, [VERSION]))
}
};