相关疑难解决方法(0)

How to make Angular Universal and PWA work together?

I have a SSR Angular app which I am trying to transform into a PWA. I want it to be server-side rendered for SEO and for the "fast first rendering" that it provides.

The PWA mode works fine when combined with SSR, but once the app is loaded, when we refresh it, the client index HTML file is loaded instead of the server-side rendered page.

I have dug into the code of ngsw-worker.js and I saw this:

// Next, check …
Run Code Online (Sandbox Code Playgroud)

javascript progressive-web-apps angular-universal angular angular-service-worker

8
推荐指数
1
解决办法
3589
查看次数