{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular-cli/issues/8872","repository_url":"https://api.github.com/repos/angular/angular-cli","labels_url":"https://api.github.com/repos/angular/angular-cli/issues/8872/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular-cli/issues/8872/comments","events_url":"https://api.github.com/repos/angular/angular-cli/issues/8872/events","html_url":"https://github.com/angular/angular-cli/issues/8872","id":282070342,"node_id":"MDU6SXNzdWUyODIwNzAzNDI=","number":8872,"title":"index.html formatting breaks Universal SSR","user":{"login":"dottodot","id":811652,"node_id":"MDQ6VXNlcjgxMTY1Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/811652?v=4","gravatar_id":"","url":"https://api.github.com/users/dottodot","html_url":"https://github.com/dottodot","followers_url":"https://api.github.com/users/dottodot/followers","following_url":"https://api.github.com/users/dottodot/following{/other_user}","gists_url":"https://api.github.com/users/dottodot/gists{/gist_id}","starred_url":"https://api.github.com/users/dottodot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dottodot/subscriptions","organizations_url":"https://api.github.com/users/dottodot/orgs","repos_url":"https://api.github.com/users/dottodot/repos","events_url":"https://api.github.com/users/dottodot/events{/privacy}","received_events_url":"https://api.github.com/users/dottodot/received_events","type":"User","site_admin":false},"labels":[{"id":385595233,"node_id":"MDU6TGFiZWwzODU1OTUyMzM=","url":"https://api.github.com/repos/angular/angular-cli/labels/need:%20repro%20steps","name":"need: repro steps","color":"fbca04","default":false},{"id":220593710,"node_id":"MDU6TGFiZWwyMjA1OTM3MTA=","url":"https://api.github.com/repos/angular/angular-cli/labels/type:%20bug","name":"type: bug","color":"EEEEEE","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":42,"created_at":"2017-12-14T11:35:22Z","updated_at":"2018-07-10T09:09:44Z","closed_at":"2018-07-09T16:27:31Z","author_association":"NONE","body":"<!--\r\nWe will close this issue if you don't provide the needed information.\r\nFor feature requests, delete the form below and describe the requirements and use case.\r\n-->\r\n\r\n### Versions\r\n```\r\nAngular CLI: 1.6.1\r\nNode: 8.9.1\r\nOS: darwin x64\r\nAngular: 5.1.1\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... http, language-service, platform-browser\r\n... platform-browser-dynamic, platform-server, router\r\n... service-worker\r\n\r\n@angular/cli: 1.6.1\r\n@angular-devkit/build-optimizer: 0.0.36\r\n@angular-devkit/core: 0.0.22\r\n@angular-devkit/schematics: 0.0.42\r\n@ngtools/json-schema: 1.1.0\r\n@ngtools/webpack: 1.9.1\r\n@schematics/angular: 0.1.11\r\ntypescript: 2.4.2\r\nwebpack-bundle-analyzer: 2.9.1\r\nwebpack: 3.10.0\r\n```\r\n\r\n### Repro steps\r\nBuild the app\r\n\r\n### Observed behavior\r\nAfter building the app and starting the express app  and I can see I not getting SSR content. However if I open the compiled index.html and save it it Visual Code so that the html is formatted again the problem goes away. This suggests that the build process is somehow formatting the html in a way that's causing the issue, but I don't get any errors.\r\n\r\nAlso the other odd thing is if I removed the Service Worker I don't get the issue so I initially though that was the problem as reported here https://github.com/angular/angular/issues/20890\r\n\r\n### Desired behavior\r\nBe able to include build app and have SSR.\r\n\r\nI'm just very confused as to how the combination of the formatted html and service worker can be preventing ssr working. \r\n\r\n### Mention any other details that might be useful (optional)\r\nI've tried removing all additions to my index.html to make sure nothing I've added causes the issue.\r\nI've only recently started having this issue but can't be sure of which version.\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular-cli/issues/comments/403754725","html_url":"https://github.com/angular/angular-cli/issues/8872#issuecomment-403754725","issue_url":"https://api.github.com/repos/angular/angular-cli/issues/8872","id":403754725,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzc1NDcyNQ==","user":{"login":"vytautas-pranskunas-","id":3918999,"node_id":"MDQ6VXNlcjM5MTg5OTk=","avatar_url":"https://avatars0.githubusercontent.com/u/3918999?v=4","gravatar_id":"","url":"https://api.github.com/users/vytautas-pranskunas-","html_url":"https://github.com/vytautas-pranskunas-","followers_url":"https://api.github.com/users/vytautas-pranskunas-/followers","following_url":"https://api.github.com/users/vytautas-pranskunas-/following{/other_user}","gists_url":"https://api.github.com/users/vytautas-pranskunas-/gists{/gist_id}","starred_url":"https://api.github.com/users/vytautas-pranskunas-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vytautas-pranskunas-/subscriptions","organizations_url":"https://api.github.com/users/vytautas-pranskunas-/orgs","repos_url":"https://api.github.com/users/vytautas-pranskunas-/repos","events_url":"https://api.github.com/users/vytautas-pranskunas-/events{/privacy}","received_events_url":"https://api.github.com/users/vytautas-pranskunas-/received_events","type":"User","site_admin":false},"created_at":"2018-07-10T09:09:43Z","updated_at":"2018-07-10T09:09:43Z","author_association":"NONE","body":"And how i can test crawlers behaviour that it get stright to SSR content?\n\nOn Tue, Jul 10, 2018 at 11:04 AM Priemar <notifications@github.com> wrote:\n\n> @gkalpak <https://github.com/gkalpak> :\n>\n> just removing the index.html entry from ngsw.json (as was suggested in\n> #8872 <https://github.com/angular/angular-cli/issues/8872> (comment))\n> will break offline afaict.\n>\n> you are right: you have to remove it form the hashtable. bec the ngsw code\n> will check the hashvalue of the served files with the hashtable, and if\n> this hashes are not equal (which is not possible bec how should you know at\n> compilation time, what the hash of a dynamic prerendered file looks like).\n> the sw will not cache this index.html and it will not work offline. ... so\n> you have to force the sw to accept and cache the prerendered index.html\n> (thats what i mean).\n>\n> Regarding your approach to cache prerendered index.html:\n> Unless I am misunderstanding something, this will not work correctly when\n> you have routes, because the same index.html will be rendered for all of\n> them (which look like navigation requests to the SW). In the best case\n> scenario, you will get a flash of irrelevant content (which is way worse\n> imo than a delay of meaningful content 😁).\n>\n> and yes thats the next point i didnt mentioned yet. and there is no\n> workaround for it ^^ theoretically the sw need to refresh the index.html on\n> every route change ... which leads to other problems to solve.\n>\n> So all over all i think we both agree on not doing any workarounds and use\n> the default mechanism, there is a reason why it acts like it does. To\n> change this behaviour a completly different implementation is required. ->\n> which leads to other disadvantages ...\n>\n> in my opinion closing this issue is pretty good. there is no need to\n> discuss a scenario (workaround) nobody should use :)\n>\n> as i said, i just wanted to clearify why things work like they do with the\n> default implementation.\n>\n> cheers\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/angular/angular-cli/issues/8872#issuecomment-403753134>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ADvMl_sURvZnc1jeOzjEOPMrLNQ50nPfks5uFG4ogaJpZM4RB7dX>\n> .\n>\n\n\n-- \n\n\nPagarbiai,\n\nVytautas Pranskunas\n"}}
{"actor":{"display_login":"vytautas-pranskunas-"}}