Allow targeting different environments with deply. Add version string on the web App component.
This commit is contained in:
@@ -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]))
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user