commit e64ab53c9252784dbae67cf619ed3e77bd8ecf24
parent a64daf2dda89fa78344191d9457ce0dc375cfc04
Author: Marcel <mtrnord1@gmail.com>
Date: Fri, 3 Jul 2020 21:31:03 +0200
Fix webpack config
Took 3 minutes
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/webpack.config.js b/webpack.config.js
@@ -10,7 +10,7 @@ const appConfig = (env, argv) => {
return {
devServer: {
contentBase: distPath,
- compress: process.env.WEBPACK_MODE === 'production',
+ compress: argv.mode === 'production',
port: 8888,
historyApiFallback: true
},
@@ -40,7 +40,7 @@ const appConfig = (env, argv) => {
include: [path.resolve(__dirname, "static"), path.resolve(__dirname, "node_modules")],
use: [
// fallback to style-loader in development
- process.env.WEBPACK_MODE !== 'production'
+ argv.mode !== 'production'
? 'style-loader'
: MiniCssExtractPlugin.loader,
'css-loader',
@@ -77,7 +77,7 @@ const appConfig = (env, argv) => {
template: path.resolve(__dirname, "static/index.html")
})
],
- watch: process.env.WEBPACK_MODE !== 'production',
+ watch: argv.mode !== 'production',
watchOptions: {
poll: true
},