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 π
02.01.2025 21:42 β π 11 π 3 π¬ 1 π 1@scriptedalchemy.bsky.social
Rspack Core Team | Creator of Module Federation. Infra Architect @ ByteDance
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 π
02.01.2025 21:42 β π 11 π 3 π¬ 1 π 1Haven'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.
03.02.2025 21:43 β π 7 π 1 π¬ 0 π 0Yeah nx doesn't have a wrapper for it yet
18.03.2025 22:33 β π 0 π 0 π¬ 0 π 0I 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.
20.12.2024 04:31 β π 0 π 0 π¬ 0 π 0But 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.
20.12.2024 04:27 β π 0 π 0 π¬ 1 π 0Internally 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
20.12.2024 04:26 β π 1 π 0 π¬ 1 π 0Yeah. 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 π
04.12.2024 11:24 β π 1 π 0 π¬ 0 π 0Lil bro > Dax
30.11.2024 23:27 β π 3 π 0 π¬ 0 π 0Whats 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.
30.11.2024 06:11 β π 1 π 0 π¬ 0 π 0Rspack has reached 1 million monthly downloads. π
29.11.2024 08:42 β π 23 π 2 π¬ 3 π 0You beat me to it
29.11.2024 07:26 β π 1 π 0 π¬ 1 π 0Federation 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.
27.11.2024 00:56 β π 0 π 0 π¬ 0 π 0The 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.
27.11.2024 00:56 β π 0 π 0 π¬ 1 π 0First 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 π
26.11.2024 20:05 β π 2 π 0 π¬ 2 π 0I 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 π
23.11.2024 10:37 β π 1 π 0 π¬ 0 π 0Let 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
22.11.2024 09:23 β π 1 π 0 π¬ 0 π 0Watch them just fork chromium and ship another one within weeks.
22.11.2024 09:05 β π 0 π 0 π¬ 0 π 0Bundlers should be language agnostic from the get go.
21.11.2024 07:57 β π 1 π 0 π¬ 0 π 0Then no problem
20.11.2024 22:54 β π 1 π 0 π¬ 1 π 0I wonder why the US cut it this time
19.11.2024 03:08 β π 0 π 0 π¬ 0 π 0Wait 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
19.11.2024 03:07 β π 1 π 0 π¬ 0 π 0Just cjs everything
19.11.2024 02:58 β π 2 π 0 π¬ 1 π 0Thank you for your astonishing talk @scriptedalchemy.bsky.social π
18.11.2024 19:36 β π 3 π 1 π¬ 0 π 0