Skip to content
Snippets Groups Projects
Commit 03591f59a141 authored by Frank Bessou's avatar Frank Bessou :spider_web:
Browse files

fix(webpack): build in dev mode even when dev server's port is used

parent ceeca6033268
No related branches found
No related tags found
1 merge request!1Many little improvements
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
module.exports = function (_, argv) { module.exports = function (_, argv) {
const isDevelopment = argv.mode === "development"; const isDevelopment = argv.mode === "development";
const isServed = argv.env.WEBPACK_SERVE;
const isProduction = argv.mode === "production"; const isProduction = argv.mode === "production";
const port = process.env.PORT || 8080; const port = process.env.PORT || 8080;
...@@ -203,7 +204,7 @@ ...@@ -203,7 +204,7 @@
}, },
], ],
}), }),
isDevelopment && new CheckPortPlugin(port), isServed && new CheckPortPlugin(port),
isProduction && new BuildFolderWiper(buildDir), isProduction && new BuildFolderWiper(buildDir),
new webpack.DefinePlugin({ new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify(argv.mode), "process.env.NODE_ENV": JSON.stringify(argv.mode),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment