-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSR stuck after remote rebuilds #5
Comments
Hi @Kinbaum , thanks for raising the issue. I'll take a look, didn't test my solution with that conditions. |
Hi @Kinbaum, unfortunately I cann't reproduce the issue with node-mf-example. Can you bring more details on your projects setup? What is the http status you receive when fetch the nextjs page? |
Hey, I have created a reproduction scenario using node-mf-example Initial build
Modifying the remote
Observing changes in the host (use incognito mode in Chrome)
Right-click and select |
bump |
This is a very complex problem to try and solve. Hot reloading servers is tricky since webpack already required the chunk from another build, it wont redownload a chunk it already has. There are ways around this though.
Some of these patterns might be best used on a stale while revalidate loop or timer so that the current page load is not slowed down by needing to restream modules |
My solution was an endpoint on my app that receives other remote apps updates so I can flush require cache. |
Okay so I’ve close to releasing a large update to my groups internal stream plugin. I’m using something that calculates the collective hash of the remotes. During invocations, I’ll load remotes again in the background and calculate the hash. If it mismatches the current hash, I set a marker that waits for server to close current requests and performs a hot reload. I’m looking at using vm.script, shared array buffer, and v8 isolates as a way to protect the main thread from pollution. Has anyone else noticed nested remote modules being skipped on first invocations? |
Hi there, thank you for the work you've done putting this together. I was just wondering if you've run into issues where your Next.js app gets "stuck" with an outdated remote via SSR?
For example:
Scenario:
The text was updated successfully, but these errors were encountered: