Zack Jackson
scriptedalchemy.bsky.social
Zack Jackson
@scriptedalchemy.bsky.social
Rspack Core Team | Creator of Module Federation. Infra Architect @ ByteDance
Yeah nx doesn't have a wrapper for it yet
March 18, 2025 at 10:33 PM
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.
December 20, 2024 at 4:31 AM
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.
December 20, 2024 at 4:31 AM
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.
December 20, 2024 at 4:27 AM
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
December 20, 2024 at 4:26 AM
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
December 19, 2024 at 11:50 PM
Please go fix react 😅
December 4, 2024 at 11:24 AM
Lil bro > Dax
November 30, 2024 at 11:27 PM
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.
November 30, 2024 at 6:11 AM
You beat me to it
November 29, 2024 at 7:26 AM
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.
November 27, 2024 at 12:57 AM
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.
November 27, 2024 at 12:56 AM
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.
November 27, 2024 at 12:56 AM
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 👌
November 26, 2024 at 8:05 PM
Call me crazy. But we should buy it 😆
November 23, 2024 at 10:37 AM
Hey, just in case you didn't see. There's some ssl/tls upgrades coming
November 22, 2024 at 9:23 AM
Watch them just fork chromium and ship another one within weeks.
November 22, 2024 at 9:05 AM
Bundlers should be language agnostic from the get go.
November 21, 2024 at 7:57 AM