-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[server-side-rendering] - server doesn't re-fetch modules #48
Comments
Yep, currently it's just proof of concept how we could connect 2 bundles. We don't have dynamic load of remoteEntry in website1. |
@benjoz could you rename it to something like that |
Done @7rulnik :) |
Just wondering - is it "doesn't refetch", or "still use cached one" |
As I can remember it loads module only once, stores it in the cache, and doesn't re-fetch it. |
I appear to have fixed this issue in streamed servers, however on local disks its not working. this is pretty much the need for HMR in production servers. Which is what was built into streamed tech. |
pretty much either the webpack cache or node cache needs to be cleared i guess for the demo purpose. Wipe all caches upon each invocation |
I also use |
And yes - cache clearing is a must for any platform. |
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 |
@7rulnik you want this sucker. https://youtu.be/kOuoSBTCzl4 |
what we could do on SSR is have the name of remoteEntry change in a random way so it would "hot reload" or redownload code |
please just use uuid |
21:00 sounds like solution for "synchronous" i18n file loading, ie without waterfall of those "headers and footers", and load the loader first. |
@ScriptedAlchemy yep but it will lead to a memory leak |
changes are, the next rewrite on streamed systems will resolve this. We are actively rewriting it. 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 |
Just need hands willing to progress the research |
Talk about programatic memory management? I am in :) |
@theKashey I have a simpler SSR demo in pull request. Maybe we could work off that and try to come with a solution? |
@ScriptedAlchemy - in which one? |
I've got some ideas on this. With startup code a available we should be able to pass chunks back to the host. For servers getting stuck. I've got a theory on how to solve this but short on time to build it out. |
You can restart the process or make the host use it’s own remote as the real entry point. Then you can send a update command that pretty much re requires the remote and in the process purges module cache because we “restart” webpack runtime |
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
Now try to update header component (website2) without touching host (website1)
Terminal 2
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)
The text was updated successfully, but these errors were encountered: