From 6dde2d268a9c3224af481e84b7f440a4dfa92bfb Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 17 Nov 2016 09:02:33 -0500 Subject: Updating client dependancies (excpet eslint) (#4567) --- webapp/webpack.config.js | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) (limited to 'webapp/webpack.config.js') diff --git a/webapp/webpack.config.js b/webapp/webpack.config.js index 4058abbd2..71e35a6d8 100644 --- a/webapp/webpack.config.js +++ b/webapp/webpack.config.js @@ -34,7 +34,7 @@ var config = { loaders: [ { test: /\.jsx?$/, - loader: 'babel', + loader: 'babel-loader', exclude: /(node_modules|non_npm_dependencies)/, query: { presets: [ @@ -49,15 +49,15 @@ var config = { { test: /\.json$/, exclude: /manifest\.json$/, - loader: 'json' + loader: 'json-loader' }, { test: /manifest\.json$/, - loader: 'file?name=files/[hash].[ext]' + loader: 'file-loader?name=files/[hash].[ext]' }, { test: /(node_modules|non_npm_dependencies)(\\|\/).+\.(js|jsx)$/, - loader: 'imports', + loader: 'imports-loader', query: { $: 'jquery', jQuery: 'jquery' @@ -65,22 +65,22 @@ var config = { }, { test: /\.scss$/, - loaders: ['style', 'css', 'sass'] + loaders: ['style-loader', 'css-loader', 'sass-loader'] }, { test: /\.css$/, - loaders: ['style', 'css'] + loaders: ['style-loader', 'css-loader'] }, { test: /\.(png|eot|tiff|svg|woff2|woff|ttf|gif|mp3|jpg)$/, loaders: [ - 'file?name=files/[hash].[ext]', - 'image-webpack' + 'file-loader?name=files/[hash].[ext]', + 'image-webpack-loader' ] }, { test: /\.html$/, - loader: 'html?attrs=link:href' + loader: 'html-loader?attrs=link:href' } ] }, @@ -88,13 +88,6 @@ var config = { new webpack.ProvidePlugin({ 'window.jQuery': 'jquery' }), - new CopyWebpackPlugin([ - {from: 'images/emoji', to: 'emoji'}, - {from: 'images/logo-email.png', to: 'images'}, - {from: 'images/circles.png', to: 'images'}, - {from: 'images/favicon', to: 'images/favicon'}, - {from: 'images/appIcons.png', to: 'images'} - ]), new webpack.LoaderOptionsPlugin({ minimize: !DEV, debug: false @@ -156,9 +149,6 @@ if (!DEV) { config.plugins.push( new webpack.optimize.OccurrenceOrderPlugin(true) ); - config.plugins.push( - new webpack.optimize.DedupePlugin() - ); } // Test mode configuration @@ -167,7 +157,7 @@ if (TEST) { config.target = 'node'; config.externals = [nodeExternals()]; } else { - // For some reason this breaks mocha. So it goes here. + // For some reason these break mocha. So they go here. config.plugins.push( new HtmlWebpackPlugin({ filename: 'root.html', @@ -175,6 +165,15 @@ if (TEST) { template: 'root.html' }) ); + config.plugins.push( + new CopyWebpackPlugin([ + {from: 'images/emoji', to: 'emoji'}, + {from: 'images/logo-email.png', to: 'images'}, + {from: 'images/circles.png', to: 'images'}, + {from: 'images/favicon', to: 'images/favicon'}, + {from: 'images/appIcons.png', to: 'images'} + ]) + ); } module.exports = config; -- cgit v1.2.3-1-g7c22