From 563b1c34c9bc4e41ebd24e40a5d2d66eea470dc1 Mon Sep 17 00:00:00 2001 From: bkmartinjr Date: Wed, 8 Aug 2018 14:21:06 -0700 Subject: [PATCH] additional webpack4 migration steps: add mode to webpack config; add webpack-cli to package.json --- client/configuration/webpack/webpack.config.dev.js | 1 + client/configuration/webpack/webpack.config.prod.js | 1 + client/package.json | 1 + 3 files changed, 3 insertions(+) diff --git a/client/configuration/webpack/webpack.config.dev.js b/client/configuration/webpack/webpack.config.dev.js index 2e8667c9..c05dba91 100644 --- a/client/configuration/webpack/webpack.config.dev.js +++ b/client/configuration/webpack/webpack.config.dev.js @@ -8,6 +8,7 @@ const src = path.resolve("src"); const nodeModules = path.resolve("node_modules"); module.exports = { + mode: "development", devtool: "eval", entry: [ "webpack-hot-middleware/client?quiet=true&noInfo=true", diff --git a/client/configuration/webpack/webpack.config.prod.js b/client/configuration/webpack/webpack.config.prod.js index 680a53ce..1322b448 100644 --- a/client/configuration/webpack/webpack.config.prod.js +++ b/client/configuration/webpack/webpack.config.prod.js @@ -15,6 +15,7 @@ const nodeModules = path.resolve("node_modules"); const publicPath = "/"; module.exports = { + mode: "production", bail: true, devtool: "cheap-source-map", entry: [require.resolve("../polyfills/polyfills"), path.join(src, "index")], diff --git a/client/package.json b/client/package.json index 1863188f..bfee334f 100644 --- a/client/package.json +++ b/client/package.json @@ -111,6 +111,7 @@ "url-loader": "^0.6.0", "web-app-manifest-loader": "^0.1.1", "webpack": "^4.16.0", + "webpack-cli": "^3.1.0", "webpack-dev-middleware": "^1.6.1", "webpack-hot-middleware": "^2.22.3" },