From fde103fe4c4ee5ab8cbb05ff77ee94302602c668 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Tue, 24 Jan 2017 15:36:31 -0800 Subject: [PATCH] Upgrade Webpack --- package.json | 5 +++-- webpack.config.js | 13 ++++++++----- webpack.production.config.js | 4 +++- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 2c3a4c29..54876628 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "style-loader": "^0.13.1", "travis-weigh-in": "^1.0.2", "url-loader": "^0.5.7", - "webpack": "^1.14.0", + "webpack": "^2.2.0", "webpack-dev-server": "^1.15.1" }, "dependencies": { @@ -63,7 +63,8 @@ "react-dom": "^15.4.2", "react-redux": "^5.0.2", "redux": "^3.5.2", - "redux-thunk": "^2.1.0" + "redux-thunk": "^2.1.0", + "webpack": "^2.2.0" }, "jest": { "testRegex": "\\.test\\.js$", diff --git a/webpack.config.js b/webpack.config.js index cc62e7ef..faae50c5 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,22 +2,25 @@ const path = require('path'); module.exports = { resolve: { - extensions: ['', '.js'] + extensions: ['.js'] }, module: { - loaders: [ + rules: [ { test: /\.css$/, - loader: 'style-loader!css-loader' + use: [ + 'style-loader', + 'css-loader' + ] }, { test: /\.png$/i, - loader: 'url-loader?limit=100000' + use: 'url-loader?limit=100000' }, { test: /\.js$/, exclude: /(node_modules|bower_components)/, - loader: 'babel' // 'babel-loader' is also a legal name to reference + use: 'babel-loader' // 'babel-loader' is also a legal name to reference } ], noParse: [ diff --git a/webpack.production.config.js b/webpack.production.config.js index 90d5d110..4fb35301 100644 --- a/webpack.production.config.js +++ b/webpack.production.config.js @@ -7,7 +7,9 @@ config.plugins = (config.plugins || []).concat([ NODE_ENV: JSON.stringify('production') } }), - new webpack.optimize.UglifyJsPlugin() + new webpack.optimize.UglifyJsPlugin({ + sourceMap: true + }) ]); config.entry = (config.entry || []).concat([