35 lines
689 B
JavaScript
35 lines
689 B
JavaScript
const merge = require('deepmerge');
|
|
const VERSION = {
|
|
'process.env': {
|
|
PM_VERSION: JSON.stringify(require('./package.json').version)
|
|
}
|
|
};
|
|
|
|
module.exports = {
|
|
devServer: {
|
|
proxy: {
|
|
'/v0': { target: 'http://localhost:8081' }
|
|
},
|
|
host: 'localhost',
|
|
disableHostCheck: true
|
|
},
|
|
|
|
// disable Hot Reloading (kills devtools performance and crashes the tab).
|
|
// chainWebpack: config => {
|
|
// config.plugins.delete("hmr");
|
|
// },
|
|
|
|
pluginOptions: {
|
|
webpackBundleAnalyzer: {
|
|
analyzerMode: 'static',
|
|
openAnalyzer: false
|
|
}
|
|
},
|
|
|
|
chainWebpack: config => {
|
|
config
|
|
.plugin('define')
|
|
.tap(args => merge(args, [VERSION]))
|
|
}
|
|
};
|