Last active
August 23, 2016 17:35
-
-
Save nikolasleblanc/b7680bfa8aa007fd84ffc8a32db613ea to your computer and use it in GitHub Desktop.
Upgrading to webpack 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## package.json changes | |
"webpack": "^2.1.0-beta.20", | |
"typescript": "^2.0.0", | |
"webpack-dev-server": "^2.1.0-beta.0", | |
"webpack-hot-middleware": "^2.12.2", | |
"webpack-split-by-path": "^0.1.0-beta.1", <-- struggles, I've removed it | |
https://github.com/BohdanTkachenko/webpack-split-by-path/pull/22#issuecomment-240050461 | |
"postcss-import": "8.0.2", <-- explicit, newer versions break webpack 2 | |
https://github.com/postcss/postcss-import/issues/220 | |
"extract-text-webpack-plugin": "^2.0.0-beta", | |
"awesome-typescript-loader": "^2.2.1", | |
"json-loader": "^0.5.4", | |
## Other changes | |
### json-loader | |
Needed to add a json-loader, since webpack was struggling to process json without it. | |
Makes sense, but was weird, since it was doing just fine with webpack 1. | |
### history-api | |
Needed to remove history-api from the shims, since it was causing issues with the production build. | |
> history.js:24Uncaught ReferenceError: Invalid left-hand side in assignment | |
### webpack-split-by-path | |
Needed to remove webpack-split-by-path, since it was causing issues with the production build. Planning on moving to CommonsChunk anyway, re angular-cli config. | |
> manifest.e08f6c4….js:1 Uncaught TypeError: Cannot read property 'call' of undefined(…) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Love this. Could we get this on our docs page webpack/webpack.io