Home
Profile
Work
Notebook
Media

December 19, 2025

Why I Dumped Node.js for Bun (And You Should Too)

It's not just hype. Migrating this website to Bun cut my install times by 90% and made the dev server instant. Here's the data.

The “It Works” Trap

For years, I stuck with Node.js. It was the reliable workhorse. npm install was slow, but it worked. npm run dev took a few seconds, but I was used to it.

Then I tried Bun.

The “Holy S**t” Moment

I ran bun install on this Astro project.

Done in 45ms.

I blinked and missed it. I thought it failed. But no, it was just… done.

Why Bun Changes the Game

  1. Speed: It’s built on Zig, not C++. It extends JavaScriptCore (like Safari), not V8 (like Chrome). It is aggressively optimized for startup time.
  2. All-in-One: No more ts-node, no more nodemon, no more dotenv, no more jest. Bun does it all natively.
  3. DX (Developer Experience): It respects your time.

Benchmarks on This Site

I migrated my Astro JS personal portfolio (the one you’re looking at!) from npm to Bun.

OperationNPMBunImprovement
Cold Install42s3s14x Faster
Dev Server Start2.5s0.4s6x Faster
Test Suite12s1s12x Faster

How to Switch

It’s absurdly easy.

# 1. Install Bun
curl -fsSL https://bun.sh/install | bash

# 2. Delete your node_modules (Cathartic!)
rm -rf node_modules package-lock.json

# 3. Install
bun install

# 4. Run
bun run dev

Configuring Astro for SSR

Since I recently moved this site to Server Side Rendering (to support dynamic blogs from Sanity & R2), Bun shines even brighter.

Using the @astrojs/cloudflare adapter with Bun for local dev means I get the best of both worlds: Edge-like performance locally.

Final Verdict

If you are building modern web apps, stop using Node.js for local development. Keep it for legacy production if you must, but for your own sanity, use Bun.

It makes coding feel fast again.


Written locally and fetched dynamically via Astro Content Collections.