mb21
mb21.bsky.social
mb21
@mb21.bsky.social
Hacking on https://mastrojs.github.io – a static site generator that runs in your browser, and accompanying web dev intro course.

https://github.com/mb21/
Reposted by mb21
New blog post on how to incrementally migrate from Express.js to the standards-based Request/Response-API

mastrojs.github.io/blog/2025-11...
Migrating from Express to the standards-based Request/Response-API | Mastro undefined
mastrojs.github.io
November 6, 2025 at 4:20 PM
Reposted by mb21
Besides running on Deno, Node.js, and inside a web browser as a VSCode extension, Mastro now also runs on Bun! 🥳

mastrojs.github.io
Mastro: the simplest web framework and site generator
No bloat, no magic, no config. Mastro gets out of the way, so that you can focus on building awesome websites.
mastrojs.github.io
October 30, 2025 at 1:18 PM
Reposted by mb21
I wrote down "what I learned porting Mastro from Deno to Node.js" Hope my learnings help somebody on their next server-side JS/TS project!

mastrojs.github.io/blog/2025-10...
What I learned porting Mastro from Deno to Node.js | Mastro
mastrojs.github.io
October 27, 2025 at 1:33 PM
Reposted by mb21
Mastro now runs on Node.js 🎉🍾

Deno makes your life still a bit easier, but I can appreciate that people like Node’s commitment to stability. And it’s catching up: can run TypeScript natively now, has a builtin --watch flag and test runner, etc.

Share if you care! mastrojs.github.io
Mastro: the simplest web framework and site generator
No bloat, no magic, no config. Mastro gets out of the way, so that you can focus on building awesome websites.
mastrojs.github.io
October 23, 2025 at 6:45 PM
Reposted by mb21
Mastro (currently Deno and browser only web framework) is coming to Node.js!
Just not sure whether via JSR (and they recommend pnpm), or via old NPM. Thoughts?
October 16, 2025 at 4:44 AM
Reposted by mb21
With all the excitement of view transitions coming to Firefox (which is great!), just be aware that cross-document view transitions for MPAs are “level 2” and thus only in Chrome and Safari so far. But I’m sure it won’t be long, and it’s just a progressive enhancement. No reason to not add it now!
October 15, 2025 at 7:17 PM
I always used to like the vibes in the Ruby community. Between DHH and Ruby Central, sorry to hear that bullshit has come to those shores as well.
September 19, 2025 at 3:16 PM
Nice article about when it might, or might not make sense to inline critical CSS. csswizardry.com/2022/09/crit...
Critical CSS? Not So Fast! – CSS Wizardry
Critical CSS promises faster loading, but is it worth the complexity? Learn when Critical CSS actually boosts performance or when it might slow you down.
csswizardry.com
September 18, 2025 at 6:08 AM
Reposted by mb21
New chapter is up, showing how you can precompute assets and HTML pages in a unified way. (spoiler: it’s just like static site generation, but for only a subset of routes) #WebDev

mastrojs.github.io/guide/bundli...
Bundling, pregenerating assets and caching | Mastro
mastrojs.github.io
September 17, 2025 at 6:26 PM
In order for mastrojs.github.io to have an Atom feed, of course I had to add a new module to non-core: jsr.io/@mastrojs/ma...
Mastro: the simplest web framework and site generator you’ve ever seen.
No bloat, no magic, no config. Mastro gets out of the way, so that you can focus on building awesome websites.
mastrojs.github.io
September 15, 2025 at 7:23 PM
Reposted by mb21
Can't believe what I'm reading. Accidentally DDoS yourself because you fetch in useEffect in 2025 is so avoidable 😂

blog.cloudflare.com/deep-dive-in...
September 13, 2025 at 8:26 AM
Reposted by mb21
I keep saying that there is no empirical evidence that vibe coding makes people more productive

I believe vibe coding users keep confusing "I enjoy coding in this way" (believable, subjective) with "I'm more productive coding in this way" (unsupported, dubious to me)

substack.com/inbox/post/1...
Where's the Shovelware? Why AI Coding Claims Don't Add Up
78% of developers claim AI makes them more productive. 14% say it's a 10x improvement. So where's the flood of new software? Turns out those productivity claims are bullshit.
substack.com
September 11, 2025 at 8:35 PM
I’m thinking of selling an EPUB version of The Mastro Guide (which will remain free to read online): mastrojs.github.io/guide/

Anybody has any experience with publishing an ebook or can recommend a publisher or self-publication platform that handles payments etc? Please share for further reach 🤗
Learn to build a website for free with HTML, CSS and JavaScript
Learn the fundamental web technologies by building your very first website and putting it live – all in your browser.
mastrojs.github.io
September 9, 2025 at 12:41 PM
I’m really happy with HTTP-first assets in Mastro: create a GET route that responds with the transformed image or bundled CSS/JS.
For static site generation, you’re done.
For server, add an `export const pregenerate = true` and add the build step to your CI/CD.
mastrojs.github.io/guide/bundli...
Bundling, pregenerating assets and caching | Mastro
mastrojs.github.io
September 8, 2025 at 3:51 PM
“Preload only the fonts that are actively used above the fold.”

www.erwinhofman.com/blog/should-...
Should you preload fonts for performance? | Erwin Hofman
Preloading fonts can speed up or slow down your site. Learn how it affects FCP/LCP, how Chrome handles preloads, and when to use them for better performance.
www.erwinhofman.com
September 7, 2025 at 3:36 PM
While Mastro is proudly #nobundler by default, I’ve started writing a chapter about what you’d do if you’re unfortunate enough that your client-side JS has grown beyond a few dozen of files: mastrojs.github.io/guide/bundli...
Bundling, pregenerating assets and caching | Mastro
mastrojs.github.io
September 7, 2025 at 12:07 PM
Reposted by mb21
True, but the use-cases where an SPA make sense really seem to shrink every year. Has there been an HTML attribute or similar proposed that would keep an element’s scroll bar position or an input’s text and cursor position across page transitions, if it has the same id? Similar to view transitions?
September 4, 2025 at 10:27 AM
Reposted by mb21
modern CSS is so good. need to take a color from your design system, desaturate it and lower the opacity? oh and you want different values for light mode and dark mode, too? boom, easy:
September 2, 2025 at 8:41 PM
Reposted by mb21
i should explain why i'm so excited about this.

i have a love/hate relationship with javascript. it's the most brittle part of the web stack. all else being equal, if you can do something without javascript you probably should.
👀 commandfor - enabled by default in Firefox 144

Soon, in all browsers, you won't need any JS to open a popover / dialog 🎉

More info in @keithamus.social post here: developer.chrome.com/blog/command...
September 2, 2025 at 11:55 PM
I rarely link to the orange site, but this is a really good comment: news.ycombinator.com/item?id=4387...
Feels like that's the same kind of reasoning like "Nobody was ever fired for choosing React".
August 25, 2025 at 9:04 AM
That’s why you need to learn HTML and CSS if you’re serious about web design.
Web Design: What is the web capable of that is hard to express in design software?
The web platform has a heaping helping of more design capability built into it than any design software does.
frontendmasters.com
August 25, 2025 at 8:54 AM
Reposted by mb21
Forget SPAs, choose MPAs. We interview @mb21.bsky.social, the creator of @mastrojs.bsky.social, a modern JavaScript meta-framework designed to build multipage apps (MPAs).

By @lorainelawson.bsky.social
Minimalist Mastro Framework Offers Modern Take on MPAs
Forget SPAs, choose MPAs. We interview the creator of Mastro, a modern JavaScript meta-framework designed to build multipage apps (MPAs).
bit.ly
August 22, 2025 at 1:01 PM
I was interviewed! Please share to get the word out. I’d love to get a conversation going where Mastro (and web dev in general) should be heading for.
August 20, 2025 at 6:37 AM
Reposted by mb21
Very exciting news. With these changes, you can more easily build accordions such as seen in this recording.

developer.chrome.com/blog/styling...

Currently supported in Chrome and Safari, and soon Firefox!
August 19, 2025 at 12:04 PM
I wonder whether anybody will do a talk similar to this one in a decade, but instead about React and/or bundlers: www.youtube.com/watch?v=wo84...
Casey Muratori – The Big OOPs: Anatomy of a Thirty-five-year Mistake – BSC 2025
www.youtube.com
August 18, 2025 at 2:39 PM