Sign in

Zack Jackson

@scriptedalchemy.bsky.social
964 followers 50 following 46 posts

Rspack Core Team | Creator of Module Federation. Infra Architect @ ByteDance

PostsRepliesMedia
Reposted by Zack Jackson
Manfred Steyer @manfredsteyer.bsky.social · 02/01/2025
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 👇
buff.ly
Nx and Angular with Rspack and Module Federation - ANGULARarchitects
In just a few years, Module Federation grew from a first implementation that shipped with webpack 5 to a whole ecosystem. Meanwhile, we have an implementation for rspack, a port to vite, and a…
1133
Zack Jackson @scriptedalchemy.bsky.social · 18/03/2025
Haven't logged in for a while. Update; we released Lynx. Our cross-platform app framework. lynxjs.org/blog/lynx-un...
lynxjs.org
Lynx
Empower the web community and invite more to build cross-platform apps
0120
Reposted by Zack Jackson
Kent C. Dodds 🌌 @kentcdodds.com · 03/02/2025
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.
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.
071
Zack Jackson @scriptedalchemy.bsky.social · 18/03/2025
Yeah nx doesn't have a wrapper for it yet
000
Zack Jackson @scriptedalchemy.bsky.social · 20/12/2024
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.
000
Zack Jackson @scriptedalchemy.bsky.social · 20/12/2024
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.
110
Zack Jackson @scriptedalchemy.bsky.social · 20/12/2024
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.
100
Zack Jackson @scriptedalchemy.bsky.social · 20/12/2024
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
110
Zack Jackson @scriptedalchemy.bsky.social · 19/12/2024
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
110
Zack Jackson @scriptedalchemy.bsky.social · 04/12/2024
Please go fix react 😅
010
Zack Jackson @scriptedalchemy.bsky.social · 30/11/2024
Lil bro > Dax
030
Zack Jackson @scriptedalchemy.bsky.social · 30/11/2024
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.
010
Reposted by Zack Jackson
Rspack @rspack.dev · 29/11/2024
Rspack has reached 1 million monthly downloads. 🎉
3242
Zack Jackson @scriptedalchemy.bsky.social · 29/11/2024
You beat me to it
110
Zack Jackson @scriptedalchemy.bsky.social · 27/11/2024
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.
010
Zack Jackson @scriptedalchemy.bsky.social · 27/11/2024
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.
000
Zack Jackson @scriptedalchemy.bsky.social · 27/11/2024
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.
100
Zack Jackson @scriptedalchemy.bsky.social · 27/11/2024
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...
github.com
feat(enhanced): support layers in consume share plugin by ScriptedAlchemy · Pull Request #3276 · module-federation/core
Description This pull request introduces several enhancements and fixes to the module sharing functionality in the enhanced package. The changes include updating the ConsumeSharedModule and Consume...
150
Zack Jackson @scriptedalchemy.bsky.social · 26/11/2024
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 👌
220
Zack Jackson @scriptedalchemy.bsky.social · 23/11/2024
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!
051
Zack Jackson @scriptedalchemy.bsky.social · 23/11/2024
Call me crazy. But we should buy it 😆
010
Reposted by Zack Jackson
Juri @juri.dev · 22/11/2024
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 😅)
github.com
GitHub - nrwl/nx: Smart Monorepos · Fast CI
Smart Monorepos · Fast CI. Contribute to nrwl/nx development by creating an account on GitHub.
0273
Zack Jackson @scriptedalchemy.bsky.social · 22/11/2024
Hey, just in case you didn't see. There's some ssl/tls upgrades coming
010
Zack Jackson @scriptedalchemy.bsky.social · 22/11/2024
Watch them just fork chromium and ship another one within weeks.
000
Zack Jackson @scriptedalchemy.bsky.social · 21/11/2024
Bundlers should be language agnostic from the get go.
010
Zack Jackson @scriptedalchemy.bsky.social · 20/11/2024
Then no problem
110
Zack Jackson @scriptedalchemy.bsky.social · 19/11/2024
I wonder why the US cut it this time
000
Zack Jackson @scriptedalchemy.bsky.social · 19/11/2024
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
010
Zack Jackson @scriptedalchemy.bsky.social · 19/11/2024
Just cjs everything
120
Reposted by Zack Jackson
JSNation @jsnation.gitnation.org · 18/11/2024
Thank you for your astonishing talk @scriptedalchemy.bsky.social 😍
031
Zack Jackson @scriptedalchemy.bsky.social · 17/11/2024
Don't forget to fill it out and check the rspack options! 🥰🥰
060
Reposted by Zack Jackson
Zack DeRose @zackderose.bsky.social · 15/11/2024
Benchmarks from the @rspack.dev w/ @angular.dev.web.brid.gy livestream: Boilerplate app build: webpack: 9.035s rspack: 4.509s Boilerplate Module Federation build (with 2 dependent remotes each): webpack: 14.010s rspack: 7.289s
132
Reposted by Zack Jackson
Rspack @rspack.dev · 16/11/2024
If we combine Rspack's module graph with @tailwindcss.com, we will get: - No more "content" config - Minimized CSS bundle size Now rsbuild-plugin-tailwindcss has implemented this experimentally🔥 github.com/rspack-contr...
github.com
GitHub - rspack-contrib/rsbuild-plugin-tailwindcss: An Rsbuild plugin to integrate with Tailwind CSS
An Rsbuild plugin to integrate with Tailwind CSS. Contribute to rspack-contrib/rsbuild-plugin-tailwindcss development by creating an account on GitHub.
1113
Zack Jackson @scriptedalchemy.bsky.social · 17/11/2024
No. The charging cable should be at a 90-degree upright position. Stand it up.
010
Zack Jackson @scriptedalchemy.bsky.social · 16/11/2024
Something like a shared singleton of zustand works quite well. Since it's atomic, you have more explicit control like you can get state from header or product and send state to it vs global where if header had a event or state called "promo" it would run risk that someone else may use generic too
000
Zack Jackson @scriptedalchemy.bsky.social · 16/11/2024
Don't do drugs. Rots the brain
010
Zack Jackson @scriptedalchemy.bsky.social · 16/11/2024
Yeah then it'll work. Just chatty. I always have to design under the assumption of hundreds of billions of invocation a day haha
110
Zack Jackson @scriptedalchemy.bsky.social · 16/11/2024
Db wouldn't handle client state effectively imo. The model is used in past was component level ownership. Whoever asks for it first provides it to everyone else. Otherwise chatter will exhaust an availability zone at scale. I'm an edge case, tho.
000
Zack Jackson @scriptedalchemy.bsky.social · 16/11/2024
1 has issues, but it is usually the best option. Something atomic and explicit, preferably 2 & 3 is implicit and error-prone (browser event, redux) 4 depends on who's building it. We plan to allow user hooks via federation runtime as way to support universal comms
000
Zack Jackson @scriptedalchemy.bsky.social · 16/11/2024
Vercel is experimenting with federation v2 for next.js, confirmed. No decisive action yet; but it's encouraging to see. I know better than to get my hopes up, but if they do want to support it - I'm happy to adjust ecosystem as needed.
1120
Reposted by Zack Jackson
Hiroki Osame @hirok.io · 15/11/2024
Confused about the `exports` field in package.json? I wrote a guide to break it down and walk you through it! 👉 hirok.io/posts/node-exports-guide
hirok.io
Guide to the Node.js `exports` field
Take control over how your npm package is accessed with the package.json `exports` field
99716
Reposted by Zack Jackson
Sebastian Gos @tatakodzi.bsky.social · 14/11/2024
📽️ If you are a micro frontends freak you have to watch this one: youtu.be/7soy7UZ17r4?... with @scriptedalchemy.bsky.social
youtu.be
The Module Federation Revolution with Zack Jackson from @ByteDance
YouTube video by My 50 cents
032
Zack Jackson @scriptedalchemy.bsky.social · 12/11/2024
Bytedance does a stand up ever other week. There's not a single PM, our task board is a Google document where we just past PR links to the work we did. I'm 3 seats away from the CTO in the org chart. With all the time saved from not talking about doing work, we ship.
000
Zack Jackson @scriptedalchemy.bsky.social · 12/11/2024
Currently working on: my job Blockers: this meeting and the other bullshit processes Why it a thing: middle management needs to feel like they matter, and micromanagement is a great way for them to fabricate value (of which they have little to none)
100
Zack Jackson @scriptedalchemy.bsky.social · 12/11/2024
Yes there should be examples already. @ ZephyrCloud on Twitter. They are working on tanstack already.
120
Zack Jackson @scriptedalchemy.bsky.social · 12/11/2024
And what we do is add additional chunks that much load to complete it. Since there's no augmented functions over the filesystem or IO like *pack has - you're limited by what the bundler runtime is capable of doing. Which is very little unless you fork the bundler
010
Zack Jackson @scriptedalchemy.bsky.social · 12/11/2024
Yes. Because these bundlers have no concept of chunk handlers or module factories the only way to make async nature of MF to work is TLA In *pack we have handlers. When a chunk is requested we can add additional side effects onto it. So it waits longer for a chunk to trigger load status.
110
Zack Jackson @scriptedalchemy.bsky.social · 12/11/2024
Vite doesn't support ssr. This is a reality of its weak underlying build tools. Esbuild and rollup have no runtime like webpack and rspack do. They also only emit esm afik which means you will leak memory in production when loading updated remotes.
110
Zack Jackson @scriptedalchemy.bsky.social · 11/11/2024
Sharing is also trickier since the bundler is the one who splits the shared modules into new chunks and replaces the share import with loadShare instead. So omnidirectional sharing is more complex to manually implement etc. But you can pass hosts shares to remote easily as we show in examples
110
Zack Jackson @scriptedalchemy.bsky.social · 11/11/2024
Yes, SSR should work assuming you provide a CommonJS remote as well.
010