{"action":"created","issue":{"url":"https://api.github.com/repos/AngularClass/angular2-hmr/issues/42","repository_url":"https://api.github.com/repos/AngularClass/angular2-hmr","labels_url":"https://api.github.com/repos/AngularClass/angular2-hmr/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/AngularClass/angular2-hmr/issues/42/comments","events_url":"https://api.github.com/repos/AngularClass/angular2-hmr/issues/42/events","html_url":"https://github.com/AngularClass/angular2-hmr/issues/42","id":195968966,"number":42,"title":"HMR / Angular CLI and lazy routes","user":{"login":"montella1507","id":10418323,"avatar_url":"https://avatars.githubusercontent.com/u/10418323?v=3","gravatar_id":"","url":"https://api.github.com/users/montella1507","html_url":"https://github.com/montella1507","followers_url":"https://api.github.com/users/montella1507/followers","following_url":"https://api.github.com/users/montella1507/following{/other_user}","gists_url":"https://api.github.com/users/montella1507/gists{/gist_id}","starred_url":"https://api.github.com/users/montella1507/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/montella1507/subscriptions","organizations_url":"https://api.github.com/users/montella1507/orgs","repos_url":"https://api.github.com/users/montella1507/repos","events_url":"https://api.github.com/users/montella1507/events{/privacy}","received_events_url":"https://api.github.com/users/montella1507/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-16T02:47:44Z","updated_at":"2016-12-19T10:08:25Z","closed_at":null,"body":"Hi,\r\n\r\nis it possible to use HMR with Lazy routes?\r\n\r\nHMR works correctly if i change something in \"normally\" loaded routes (components).\r\n\r\nbut if i change something in Lazy loaded module, it will refresh the entire page with error:\r\n\r\n`HMR] Cannot apply update. Need to do a full reload!(anonymous function) @ dev-server.js:33ZoneDelegate.invoke @ zone.js:232Zone.run @ zone.js:114(anonymous function) @ zone.js:502ZoneDelegate.invokeTask @ zone.js:265Zone.runTask @ zone.js:154drainMicroTaskQueue @ zone.js:401\r\ndev-server.js:34 [HMR] Error: A platform with a different configuration has been created. Please destroy it first.\r\n    at assertPlatform (http://localhost:4200/vendor.bundle.js:27579:15)\r\n    at http://localhost:4200/vendor.bundle.js:27564:16\r\n    at bootstrap (http://localhost:4200/main.bundle.js:273:132)\r\n    at hmrBootstrap (http://localhost:4200/main.bundle.js:1091:5)\r\n    at Object.<anonymous> (http://localhost:4200/main.bundle.js:277:90)\r\n    at Object.494 (http://localhost:4200/main.bundle.js:288:30)\r\n    at __webpack_require__ (http://localhost:4200/inline.bundle.js:686:30)\r\n    at hotApply (http://localhost:4200/inline.bundle.js:613:14)\r\n    at hotUpdateDownloaded (http://localhost:4200/inline.bundle.js:311:13)\r\n    at hotAddUpdateChunk (http://localhost:4200/inline.bundle.js:291:13)(anonymous function) @ dev-server.js:34ZoneDelegate.invoke @ zone.js:232Zone.run @ zone.js:114(anonymous function) @ zone.js:502ZoneDelegate.invokeTask @ zone.js:265Zone.runTask @ zone.js:154drainMicroTaskQueue @ zone.js:401\r\ndev-server.js:49[HMR] Waiting for update signal from WDS...`\r\n\r\nBut strange is, it wont work if i change something in my \"SharedModule\" with shared components - across all modules (lazy loaded too)\r\n\r\n`    if (!platform.injector.get(requiredToken, null)) {\r\n        throw new Error('A platform with a different configuration has been created. Please destroy it first.');\r\n    }`\r\nit will drop (requiredToken is \"Platform: browserDynamic\")\r\n\r\nI have solution from there:\r\nhttps://medium.com/@beeman/tutorial-enable-hrm-in-angular-cli-apps-1b0d13b80130#.jbftda8bb\r\n\r\nThanks for your work."},"comment":{"url":"https://api.github.com/repos/AngularClass/angular2-hmr/issues/comments/267927043","html_url":"https://github.com/AngularClass/angular2-hmr/issues/42#issuecomment-267927043","issue_url":"https://api.github.com/repos/AngularClass/angular2-hmr/issues/42","id":267927043,"user":{"login":"montella1507","id":10418323,"avatar_url":"https://avatars.githubusercontent.com/u/10418323?v=3","gravatar_id":"","url":"https://api.github.com/users/montella1507","html_url":"https://github.com/montella1507","followers_url":"https://api.github.com/users/montella1507/followers","following_url":"https://api.github.com/users/montella1507/following{/other_user}","gists_url":"https://api.github.com/users/montella1507/gists{/gist_id}","starred_url":"https://api.github.com/users/montella1507/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/montella1507/subscriptions","organizations_url":"https://api.github.com/users/montella1507/orgs","repos_url":"https://api.github.com/users/montella1507/repos","events_url":"https://api.github.com/users/montella1507/events{/privacy}","received_events_url":"https://api.github.com/users/montella1507/received_events","type":"User","site_admin":false},"created_at":"2016-12-19T10:08:25Z","updated_at":"2016-12-19T10:08:25Z","body":"@antonybudianto7  it worked with thr same version of CLI, but after \"something\".. when i change something in 80% of my code it must reload entire page...\r\n\r\nIm not sure if i forgot something or not.. I have only 1x accept() in my code (i have HMR specific code only in hmr.ts and main.ts ( https://medium.com/@beeman/tutorial-enable-hrm-in-angular-cli-apps-1b0d13b80130#.jbftda8bb like here). \r\n\r\nIs there anything needed in every module? "}}
{"actor":{"display_login":"montella1507"}}