The first thing I tried out when I found the new rsbuild plugin for Nx and Angular under the X-mas tree was Module Federation. Here you find all the details π
The first thing I tried out when I found the new rsbuild plugin for Nx and Angular under the X-mas tree was Module Federation. Here you find all the details π
Haven't logged in for a while.
Update; we released Lynx. Our cross-platform app framework. lynxjs.org/blog/lynx-un...
A laptop screen displays a video call on the Riverside platform featuring Kent C. Dodds on the left and Zachary Jackson on the right. Kent is wearing a red shirt and speaking with a focused expression. His background includes a glowing βEpicβ sign and shelves with decorative items. Zachary has dark hair, a beard, and is wearing earbuds while smiling slightly. His background features a workspace with tools mounted on the wall. The call has been recording for 24 minutes and 3 seconds, as indicated by the timer at the bottom of the screen. The interface shows recording, microphone, camera, and call controls.
Man I just love talking with @scriptedalchemy.bsky.social. Such a smart guy solving massive scale problems at @bytedance.bsky.social. Very excited to talk with him more at #EpicWebConf. Look forward to his interview coming up soon.
Yeah nx doesn't have a wrapper for it yet
I just like the import from style for MFE and many others did too. But that my personal preference others followed. Federation works with many other patterns. LOSA is what single spa uses. That works too.
But byte had unified infra. So, the infra team controls most aspects like this in our meta frameworks. These problems are primarily experienced by outside users, hence the bridge layer.
Alternatively, you can do older school LOSA architecture, which is immune to this particular issue.
We also control all package versions via a server since federation is bound to vmok in house. So we just change a drop down selection to adjust supply chain. If there's a incompatibility then either we pin those to versions that work or enable the bridge till end user updates on their own time.
Internally we bake the framework bridges into a runtime plugin. So the system automatically detects incompatible majors and will wrap the imported module in an adapter on the way to the consumer. So consumer wouldn't even know. Externally we just expose the bridge system so less witchcraft
Yeah. So this is a problem of my own making with the import from polylith style.
1. we have share scope, allowing multiple singletons
2. we provide adapter and framework bridges allowing you to mount other apps or majors
Please go fix react π
Lil bro > Dax
Whats your raw rolldown speed expected if js wasn't bottlenecking it? Pretty good speedup for drop-in. Rspack does about 3x when babel loaders are used heavily.
Rspack has reached 1 million monthly downloads. π
You beat me to it
Federation examples repo/runtime-plugins/remote-router or one of the other ones.
Also Federation already supports remote types, as does using it at runtime with loadRemote instead of import.
But federation would see the key in its cache and just use the first one it found. Meanwhile I need to load it again and change it's source. So the key can't just be what the request is. Since "react" is technically two different modules now.
The problem with module sharing is it does not carry layer info. So if the import is "react" the resolver cache thinks it's already fulfilled, returning the first react variant that matches. But layers means you can import react again and it resolve to something else.
First phase of adding layer support to module federation.
Layers is how RSC and ReactLynx are able to work.
It allows you to share a package like "react" as a singleton, but it can mean different things to each layer.
github.com/module-feder...
Yeah. Basically any time you could not statically know what it is you want. Like you can do dynamic remotes with runtime plugin if all you want to do is swap out the urls etc. But if you needed to import(unknown/unknown) and there's nothing you know to configure at compule time then dynamic is π
I got Lynx running on my phone after many delays!
ReactLynx compiles in a mere 100ms. Orders of magnitude better than react-native π excited for this one. Looks like a banger in the making.
Hermes better watch out!
Call me crazy. But we should buy it π
Let it rain β¨ & celebrate OSS π
Quote this post to keep the appreciation train going and
π list 3 OSS repos with links
β star them on GH
π star all repos of ur quote train π€©
Mine:
- github.com/vitejs/vite
- github.com/web-infra-de...
- github.com/nrwl/nx (obsly π
)
Hey, just in case you didn't see. There's some ssl/tls upgrades coming
Watch them just fork chromium and ship another one within weeks.
Bundlers should be language agnostic from the get go.
Then no problem
I wonder why the US cut it this time
Wait wait. We have never met in person?! I could have sworn we bumped into each other somewhere. But I may be getting a non Simpsons photo confused with our GH interactions over the years. Either way it was awesome to meet you again/first time in person after so long
Just cjs everything
Thank you for your astonishing talk @scriptedalchemy.bsky.social π