-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
Versions
Angular CLI: 1.6.1
Node: 8.9.1
OS: darwin x64
Angular: 5.1.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker
@angular/cli: 1.6.1
@angular-devkit/build-optimizer: 0.0.36
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.42
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.1
@schematics/angular: 0.1.11
typescript: 2.4.2
webpack-bundle-analyzer: 2.9.1
webpack: 3.10.0
Repro steps
Build the app
Observed behavior
After 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.
Also 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 angular/angular#20890
Desired behavior
Be able to include build app and have SSR.
I'm just very confused as to how the combination of the formatted html and service worker can be preventing ssr working.
Mention any other details that might be useful (optional)
I've tried removing all additions to my index.html to make sure nothing I've added causes the issue.
I've only recently started having this issue but can't be sure of which version.