module-federation-examples: [server-side-rendering] - server doesn't re-fetch modules

Step to reproduce

In a first terminal - Terminal 1

  • cd server-side-rendering/website1
  • yarn install
  • yarn build && yarn serve

In a second terminal - Terminal 2

  • cd server-side-rendering/website2
  • yarn install
  • yarn build && yarn serve

at this step : everything is working fine and header component is loaded through localhost:3002

Capture d’écran 2020-05-15 à 11 49 32 AM Capture d’écran 2020-05-15 à 11 49 46 AM

Now try to update header component (website2) without touching host (website1)

Terminal 2

  • CTRL+C
  • on website2/src/components/SomeComponent.js update line 13 with “Zack is awesome
  • yarn build && yarn serve

Actual results on localhost:3001 - Client side you will see “Zack is awesome” however on the DOM you will still see “Header”

Result expected we should have “Zack is awesome” on Client & DOM without having to rebuild HOST(website1)

Capture d’écran 2020-05-15 à 11 50 27 AM Capture d’écran 2020-05-15 à 11 50 32 AM

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 4
  • Comments: 22 (21 by maintainers)

Most upvoted comments

changes are, the next rewrite on streamed systems will resolve this. We are actively rewriting it. I’m also working with Google, so we plan to introduce programmatic memory management into V8.

If anyone wants to collaborate on this, I’m willing to talk about it in more depth. But for the time being, i have alternative solutions that are part of proprietary tools. They take a very different approach but this is possible to achieve imo

BTW, the whole solution with the same disk looks weird. I believe that people mostly use docker containers. So we need the way to load remote chunks by HTTP on the server-side

Done @7rulnik 😃

@benjoz could you rename it to something like that server doesn't re-fetch modules?