angular-hot-loader
angular-hot-loader copied to clipboard
Fixed "aSourceMapConsumer.eachMapping is not a function"
This fixed the issue #31. This solution should work in Webpack 2/3/4.
I can not test this solution today, because I do not have a project on angularjs. But I will test it on work project on Monday and report the result.
This solution is working. But the source-map package was updated without checking its compatibility, which led to this issue, as well as to the fact that Travis could not run the check. Perhaps this has led to some other issues.
@Mar-Ser your fix almost made the plugin work for me. Instead of the "aSourceMapConsumer.eachMapping is not a function" error, I get an error complaining about elm.injector() returning null and then calling has('$state') on it. Found it out by stepping through the code in the debugger.
Uncaught TypeError: Cannot read property 'has' of undefined
at HotAngular../node_modules/angular-hot-loader/lib/angular-hot-loader.js.HotAngular.reloadState (angular-hot-loader.js:97)
at HotAngular../node_modules/angular-hot-loader/lib/interceptors/config.js.module.exports [as config] (config.js:9)
at Object../src/common/user/user.js (user.js:5)
at __webpack_require__ (bootstrap:724)
at fn (bootstrap:101)
at Object../src/common/common.js (common.js:17)
at __webpack_require__ (bootstrap:724)
at fn (bootstrap:101)
at Object../src/app.js (app.js:17)
at __webpack_require__ (bootstrap:724)
Any ideas appreciated, would be so great to get HMR working :D
@royalrex Sorry for I am not answering a long time... I spent much time to trying made it work. But even when it is not throwing errors - it is not do anything. So, I think it wastes time if it can not hot reload anything valuable...