yargalot / angular-hmr Goto Github PK
View Code? Open in Web Editor NEWA Webpack loader for Hot Module Replacement in Angular applications.
A Webpack loader for Hot Module Replacement in Angular applications.
I tried to apply the angular-HMR to the existing project and got this error:
[HMR] TypeError: Cannot read property 'has' of undefined
at HotAngular.reloadState (http://localhost:8080/assets/style-guide.js:61911:26)
at module.exports as directive
at Object. (http://localhost:8080/assets/style-guide.js:67077:63)
at webpack_require (http://localhost:8080/assets/style-guide.js:521:30)
at hotApply (http://localhost:8080/assets/style-guide.js:476:14)
at hotUpdateDownloaded (http://localhost:8080/assets/style-guide.js:269:13)
at hotAddUpdateChunk (http://localhost:8080/assets/style-guide.js:249:13)
at webpackHotUpdateCallback (http://localhost:8080/assets/style-guide.js:5:12)
at http://localhost:8080/assets/0.b36e9a53c6b398f686b1.hot-update.js:1:1
Any advices, or is it a bug? The library seems to understand the angular directives and logs them into console, so i guess there is just a small bug somewhere.
Hi, I've just set this project up with Angular HMR.
As a side note, since the example calls the global Angular variable
Angular
instead ofangular
, I had to change theangularModule
regexp inangular-hmr/index.js
to accept this variable name
var angularModule= /[aA]ngular[\.\n ]+module\(([\'\"\w\.\/\(\)\n\-\,\[\] ]+)\)/g;
BTW, should we address this case in another issue?
So, when I try to hot update a controller (e.g. page3Controller.js
), I get no hot reload and the following error Uncaught RangeError: Maximum call stack size exceeded
. The infinitely-called function is hotAddUpdateChunk
.
Anyone using or still working on this? @yargalot
All other webpack loaders follow the naming convention of
<name-of-loader>-loader
Rename this project to "angular-hmr-loader" for two reasons:
Once this is done, I'd suggest tweeting.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.