diff --git a/package.json b/package.json index 2bcf7ba..2f548ff 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "Wedding website for myself and my (future) wife", "main": "index.js", "scripts": { - "build": "node_modules/.bin/webpack -p --config webpack.config.js", - "watch": "node_modules/.bin/webpack -p --config webpack.config.js --watch", + "build": "node_modules/.bin/webpack --config webpack.config.js", + "watch": "node_modules/.bin/webpack --config webpack.config.js --watch", "start-dev": "node_modules/.bin/nodemon build/server.js --watch ./build", "start-prod": "node build/server.js", "test": "echo \"Error: no test specified\" && exit 1" @@ -35,15 +35,15 @@ "dependencies": { "babel-cli": "^6.11.4", "babel-core": "^6.13.2", - "babel-loader": "^6.2.10", + "babel-loader": "^6.4.1", "babel-preset-es2015": "^6.13.2", "babel-preset-react": "^6.11.1", "copy-webpack-plugin": "^4.0.1", - "css-loader": "^0.26.1", + "css-loader": "^0.26.4", "dotenv": "^2.0.0", "ejs": "^2.5.5", "express": "^4.14.0", - "extract-text-webpack-plugin": "^1.0.1", + "extract-text-webpack-plugin": "^2.1.2", "file-loader": "^0.9.0", "node-sass": "^4.1.1", "react": "^15.3.2", @@ -51,7 +51,7 @@ "react-router": "^2.6.1", "reset-css": "^2.2.0", "sass-loader": "^4.1.1", - "webpack": "^1.13.3", + "webpack": "^3.0.0", "x-frame-options": "^1.0.0" } -} \ No newline at end of file +} diff --git a/webpack.config.js b/webpack.config.js index 8b65683..a56ab34 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -26,7 +26,7 @@ module.exports = [ loaders: [ { test: /\.scss$/, - loader: ExtractTextPlugin.extract("css!sass") + loader: ExtractTextPlugin.extract("css-loader!sass-loader") }, { test: /\.(eot|svg|ttf|woff|woff2)/, @@ -38,8 +38,9 @@ module.exports = [ new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV) }), - new ExtractTextPlugin('../css/[name].css', { - allChunks: true + new ExtractTextPlugin({ + allChunks: true, + filename: '../css/[name].css' }), new CopyWebpackPlugin([ {from: __dirname + '/src/static/img', to: '../img'} @@ -65,11 +66,7 @@ module.exports = [ path.join(__dirname, 'src', 'static'), path.join(__dirname, 'src', 'views') ], - loader: ['babel-loader'], - query: { - cacheDirectory: 'babel-cache', - presets: ['react', 'es2015'] - } + loader: ['babel-loader'] } ] }, @@ -77,8 +74,6 @@ module.exports = [ new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV) }), - new webpack.optimize.DedupePlugin(), - new webpack.optimize.OccurenceOrderPlugin(), new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false }, mangle: true, @@ -111,10 +106,7 @@ module.exports = [ path.join(__dirname, 'dist'), path.join(__dirname, 'src', 'static') ], - loader: ['babel-loader'], - query: { - presets: ['react', 'es2015'] - } + loader: ['babel-loader'] } ] },