nestjs/ng-universal

browser-sync (page auto reload) is not working as expected

3Shain opened this issue · 1 comments

browser-sync (page auto reload) is not working as expected


[ ] Regression 
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

After code modifications and save, the browser tab starts to reload but gets stuck, the devtools shows the request is in pending status.

Expected behavior

The page should reload and modified version app appears.

Minimal reproduction of the problem with instructions

https://github.com/3Shain/BiliChat/tree/main

npm run dev:ssr then you can try to modify something in /projects/core

What is the motivation / use case for changing the behavior?

Although I can reload the page manually but this is still inefficient and frustrating.

I guess this is because when the 'browser-sync-client' provided by nguniversal notify client that there is a change , however the nestjs server is not actually ready, so the reload request from browser can not be handled in time.

Environment


Nest version: 7.5.5

 
For Tooling issues:
- Node version: 12.6.3  
- Platform:  Mac 

Others:

Finally I decide not to use nguniversal coz it only gives me pain :(