Add custom variable check for webpack dev server

This commit is contained in:
Bill Thornton
2021-10-04 01:03:46 -04:00
parent fda52baed5
commit 3b4ff70709
3 changed files with 13 additions and 5 deletions
+6
View File
@@ -1,5 +1,6 @@
const common = require('./webpack.common');
const { merge } = require('webpack-merge');
const { DefinePlugin } = require('webpack');
module.exports = merge(common, {
// In order for live reload to work we must use "web" as the target not "browserlist"
@@ -23,6 +24,11 @@ module.exports = merge(common, {
}
]
},
plugins: [
new DefinePlugin({
'process.env.WEBPACK_SERVE': true
})
],
devServer: {
compress: true,
client: {