Comments (22)
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
from module-federation-examples.
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
from module-federation-examples.
@benjoz could you rename it to something like that server doesn't re-fetch modules
?
from module-federation-examples.
Done @7rulnik :)
from module-federation-examples.
Yep, currently it's just proof of concept how we could connect 2 bundles. We don't have dynamic load of remoteEntry in website1.
from module-federation-examples.
Just wondering - is it "doesn't refetch", or "still use cached one"
from module-federation-examples.
As I can remember it loads module only once, stores it in the cache, and doesn't re-fetch it.
But some new features for loading remotes were introduced in beta-17
, but I didn't have time to check it. Maybe it will help.
from module-federation-examples.
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.
@theKashey do you think your node cache clearing would work within this repo (server-side-rendering example) Since I'm not injecting phantom files during streams :P
from module-federation-examples.
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
from module-federation-examples.
I also use target: async-node
. Which might work better for SSR?
from module-federation-examples.
async-node
is not supported by every "import->require" rewiring code splitting solution, which is every codesplitting library, universal
included, except imported-components
, which will basically eagerly import everything, making async
mode a bit useless.
And yes - cache clearing is a must for any platform.
from module-federation-examples.
@7rulnik you want this sucker. https://youtu.be/kOuoSBTCzl4
from module-federation-examples.
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
from module-federation-examples.
please just use uuid
from module-federation-examples.
@7rulnik you want this sucker. https://youtu.be/kOuoSBTCzl4
21:00 sounds like solution for "synchronous" i18n file loading, ie without waterfall of those "headers and footers", and load the loader first.
from module-federation-examples.
@ScriptedAlchemy yep but it will lead to a memory leak
from module-federation-examples.
Just need hands willing to progress the research
from module-federation-examples.
Talk about programatic memory management? I am in :)
from module-federation-examples.
@theKashey I have a simpler SSR demo in pull request. Maybe we could work off that and try to come with a solution?
from module-federation-examples.
@ScriptedAlchemy - in which one?
from module-federation-examples.
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.
from module-federation-examples.
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
from module-federation-examples.
Related Issues (20)
- rspack-webpack-offload no work! HOT 2
- 404 pages are rendered in federated URLs in nextjs v13 with nextjs-mf v8. HOT 2
- issue with makeSerializable HOT 10
- Child Applications are re-rendering and the states are getting reset when the apllications are loaded using the concept of Dynamic Remote Containers HOT 1
- App router support HOT 7
- NEXT_PRIVATE_LOCAL_WEBPACK HOT 5
- Invalid hook call. Hooks can only be called inside of the body of a function component. HOT 1
- Remote is online but error log says offline HOT 1
- "simple-node" example fails if update "@module-federation/node" dependency to "2.0.11" HOT 2
- Module not found: Can't resolve 'encoding' in '../node_modules/node-fetch/lib' HOT 3
- Please use Angular17.2 as the shell, use the Native Federation package, Angular12 as the remote, use the Module Federation package. Is there any such example? HOT 1
- Is there any example of using server rendering with rspack? HOT 1
- vite-react-microfrontends demo missing file HOT 5
- nextjs(host)+ react webpack(remote):No ModuleFederationPlugin(s) found. HOT 15
- Any Next.js 14 example? HOT 2
- nextjs-v13 routing does not work HOT 1
- nextjs-v13 getServerSideProps not working HOT 10
- Using external-remotes-plugin with @module-federation/nextjs-mf HOT 1
- Uncaught SyntaxError: Unexpected token function when use module federation v1.5 HOT 3
- Code Nextjs-v14 throws error when try to run HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from module-federation-examples.