From 3fc5fb65042076798942486b1df3ed6abaea5ca6 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 25 Jul 2016 21:21:39 +0200 Subject: [PATCH 1/6] Upgrade to webpack v2 --- config/babel.dev.js | 2 +- config/babel.prod.js | 2 +- config/webpack.config.prod.js | 2 +- package.json | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/babel.dev.js b/config/babel.dev.js index 39309b2124..e5bf174283 100644 --- a/config/babel.dev.js +++ b/config/babel.dev.js @@ -10,7 +10,7 @@ module.exports = { cacheDirectory: true, presets: [ - 'babel-preset-es2015', + 'babel-preset-es2015-webpack', 'babel-preset-es2016', 'babel-preset-react' ].map(require.resolve), diff --git a/config/babel.prod.js b/config/babel.prod.js index 77a33cf475..d32b6b6483 100644 --- a/config/babel.prod.js +++ b/config/babel.prod.js @@ -9,7 +9,7 @@ module.exports = { presets: [ - 'babel-preset-es2015', + 'babel-preset-es2015-webpack', 'babel-preset-es2016', 'babel-preset-react' ].map(require.resolve), diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index 89f50f764b..ce29a0a5f9 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -73,7 +73,7 @@ module.exports = { // Disable autoprefixer in css-loader itself: // https://github.com/webpack/css-loader/issues/281 // We already have it thanks to postcss. - loader: ExtractTextPlugin.extract('style', 'css?-autoprefixer!postcss') + loader: ExtractTextPlugin.extract({ fallbackLoader: 'style', loader: 'css?-autoprefixer!postcss' }) }, { test: /\.json$/, diff --git a/package.json b/package.json index 321b19178a..5a5019b88a 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "babel-plugin-transform-class-properties": "6.10.2", "babel-plugin-transform-object-rest-spread": "6.8.0", "babel-plugin-transform-react-constant-elements": "6.9.1", - "babel-preset-es2015": "6.9.0", + "babel-preset-es2015-webpack": "^6.4.2", "babel-preset-es2016": "6.11.3", "babel-preset-react": "6.11.1", "chalk": "1.1.3", @@ -46,7 +46,7 @@ "eslint-plugin-import": "1.10.3", "eslint-plugin-jsx-a11y": "2.0.1", "eslint-plugin-react": "5.2.2", - "extract-text-webpack-plugin": "1.0.1", + "extract-text-webpack-plugin": "^2.0.0-beta.3", "file-loader": "0.9.0", "fs-extra": "^0.30.0", "html-webpack-plugin": "2.22.0", @@ -56,7 +56,7 @@ "rimraf": "2.5.3", "style-loader": "0.13.1", "url-loader": "0.5.7", - "webpack": "1.13.1", + "webpack": "^2.1.0-beta.20", "webpack-dev-server": "1.14.1" }, "devDependencies": { From 2466010becf4660a7bdbaf60b0748c111ec07a06 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 25 Jul 2016 22:01:43 +0200 Subject: [PATCH 2/6] Remove babel-preset-es2016 --- config/babel.dev.js | 1 - config/babel.prod.js | 1 - 2 files changed, 2 deletions(-) diff --git a/config/babel.dev.js b/config/babel.dev.js index e5bf174283..e2a66b1223 100644 --- a/config/babel.dev.js +++ b/config/babel.dev.js @@ -11,7 +11,6 @@ module.exports = { cacheDirectory: true, presets: [ 'babel-preset-es2015-webpack', - 'babel-preset-es2016', 'babel-preset-react' ].map(require.resolve), plugins: [ diff --git a/config/babel.prod.js b/config/babel.prod.js index d32b6b6483..3ca092bd0e 100644 --- a/config/babel.prod.js +++ b/config/babel.prod.js @@ -10,7 +10,6 @@ module.exports = { presets: [ 'babel-preset-es2015-webpack', - 'babel-preset-es2016', 'babel-preset-react' ].map(require.resolve), plugins: [ From 8b33bde12c36ec242bc8132bf09dbf8ce3847ec0 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 25 Jul 2016 22:03:41 +0200 Subject: [PATCH 3/6] Remove carets --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5a5019b88a..fd50c230fd 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "eslint-plugin-import": "1.10.3", "eslint-plugin-jsx-a11y": "2.0.1", "eslint-plugin-react": "5.2.2", - "extract-text-webpack-plugin": "^2.0.0-beta.3", + "extract-text-webpack-plugin": "2.0.0-beta.3", "file-loader": "0.9.0", "fs-extra": "^0.30.0", "html-webpack-plugin": "2.22.0", @@ -56,7 +56,7 @@ "rimraf": "2.5.3", "style-loader": "0.13.1", "url-loader": "0.5.7", - "webpack": "^2.1.0-beta.20", + "webpack": "2.1.0-beta.20", "webpack-dev-server": "1.14.1" }, "devDependencies": { From c775b3981ab24cec9789abf5124b4265c110407b Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 26 Jul 2016 06:53:27 +0200 Subject: [PATCH 4/6] Reenable UglifyJS source maps --- config/webpack.config.prod.js | 1 + 1 file changed, 1 insertion(+) diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index ce29a0a5f9..fb0e309991 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -120,6 +120,7 @@ module.exports = { new webpack.optimize.OccurrenceOrderPlugin(), new webpack.optimize.DedupePlugin(), new webpack.optimize.UglifyJsPlugin({ + sourceMap: true, compressor: { screw_ie8: true, warnings: false From 8911fef0a5f83fe192fd37b98cfd86a3a64b9556 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 26 Jul 2016 06:53:44 +0200 Subject: [PATCH 5/6] resolveLoader.root -> resolveLoader.modules --- config/webpack.config.dev.js | 2 +- config/webpack.config.prod.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index 5503096179..fa0b53b5e9 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -48,7 +48,7 @@ module.exports = { extensions: ['', '.js'], }, resolveLoader: { - root: nodeModulesPath, + modules: nodeModulesPath, moduleTemplates: ['*-loader'] }, module: { diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index fb0e309991..e582644388 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -49,7 +49,7 @@ module.exports = { extensions: ['', '.js'], }, resolveLoader: { - root: nodeModulesPath, + modules: nodeModulesPath, moduleTemplates: ['*-loader'] }, module: { From 4b998072f1e76ef209834c398c6841da114e10ec Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 26 Jul 2016 08:01:26 +0200 Subject: [PATCH 6/6] Increment webpack-dev-server version, remove caret --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fd50c230fd..4acd156bc0 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "babel-plugin-transform-class-properties": "6.10.2", "babel-plugin-transform-object-rest-spread": "6.8.0", "babel-plugin-transform-react-constant-elements": "6.9.1", - "babel-preset-es2015-webpack": "^6.4.2", + "babel-preset-es2015-webpack": "6.4.2", "babel-preset-es2016": "6.11.3", "babel-preset-react": "6.11.1", "chalk": "1.1.3", @@ -57,7 +57,7 @@ "style-loader": "0.13.1", "url-loader": "0.5.7", "webpack": "2.1.0-beta.20", - "webpack-dev-server": "1.14.1" + "webpack-dev-server": "2.1.0-beta.0" }, "devDependencies": { "bundle-deps": "^1.0.0",