Why I Actually Switched From Webpack to Turbopack

Look, I'm tired of webpack taking 5 minutes to build our damn app. Tobias Koppers made webpack, got sick of it being slow as hell, and built Turbopack in Rust instead. Smart move.

The Build Time Hell Problem

We've all been there - you change one line of CSS and webpack takes 30 seconds to hot reload. Our team wasted probably 2 hours a day waiting for builds on a 200k line React app. Ask any developer - build times are everyone's #1 complaint.

Turbopack actually fixes this with incremental computation - it only rebuilds what changed and caches everything at the function level. No more rebuilding the entire app when you fix a typo.

The unified architecture handles client, server, and edge builds in one go instead of managing three separate webpack configs that inevitably break each other. No more debugging webpack config conflicts between development and production modes.

Performance Numbers That Don't Completely Lie

Next.js added production builds to beta recently. The marketing claims 700x faster HMR only applies with 30k+ modules and perfect conditions. Real apps see 2-5x improvements, which is still worth it:

  • ~2x faster builds on my 4-core laptop (4 min → 2 min, not instant but better)
  • 3x faster on CI with 8-core GitHub runners, saves us money
  • 10x faster HMR - went from 2-3 seconds to 200ms, actually usable now
  • Cold starts don't suck - 45 seconds to 12 seconds on our massive monorepo setup

Your mileage will vary based on project size, webpack config, and whether you're stuck on Windows/WSL2.

Production Reality Check

They're running it on vercel.com, v0.app, and nextjs.org in actual production. That's real validation, not just toy demos. Bundle sizes are comparable or smaller than webpack in most cases.

But it's still beta for production builds - we're using it on staging, not betting the company on it yet. Check the compatibility docs before you migrate your critical stuff. The official Turbopack roadmap shows what's coming next if you want to track progress.

The Rust Gamble

Half the JavaScript ecosystem is moving to Rust now - SWC, Biome, Lightning CSS. Turbopack joins the club because JavaScript tooling performance hits a wall at scale. Pro tip: if you see 'rewritten in Rust' in 2025, there's probably a good reason.

Rust gives them memory safety without garbage collection overhead and actual parallelization instead of the single-threaded JavaScript event loop bullshit. The tradeoff? Fewer people can contribute fixes when things break, and debugging Rust panics is not fun. But the Rust book explains why panics happen if you're brave enough to dig in.

Worth it though - my builds are finally fast enough that I don't go get coffee while waiting. If you're curious about the technical details, check out the Turbopack architecture deep dive.

But performance claims are just marketing until you compare them to real alternatives. Time to see how it actually compares to other bundlers.

Actually Migrating to Turbopack (And What Breaks)

The marketing says "just add --turbopack and it works!" Reality is messier. Production builds are still in beta over a year after launch. Don't migrate your production app on a Friday.

The "Simple" Setup (That Usually Works)

For basic Next.js apps, yeah it's pretty easy:

{
  "scripts": {
    "dev": "next dev --turbopack",
    "build": "next build --turbopack", 
    "start": "next start"
  }
}

If you're lucky and have zero custom webpack config, this might actually work first try. Most apps are not this simple.

What Actually Works Without Breaking

Basic stuff that works fine:

  • TypeScript and JSX - yeah, the basic stuff works fine
  • CSS modules and Sass - if you're into that
  • Regular imports and static assets - not rocket science
  • Hot module replacement that doesn't take forever

Less basic stuff:

  • PostCSS configuration gets picked up automatically
  • Path aliases from your tsconfig.json work
  • Tree shaking works but isn't as aggressive as webpack yet

Where It All Goes Wrong (Migration Reality)

"Most applications work immediately" is bullshit marketing speak. Here's what actually breaks:

Things That Will Ruin Your Day:

  • Custom webpack plugins: Not supported, period. Hope you weren't using Bundle Analyzer or anything important
  • Complex SVG handling: Our @svgr/webpack setup took 3 hours to migrate and still doesn't work exactly right. You'll see Error: Cannot resolve module for SVG imports and want to throw your laptop
  • Weird CSS-in-JS libraries: Some styled-components patterns break mysteriously with ReferenceError: styled is not defined at runtime. Took down our staging for 2 hours figuring that shit out
  • Yarn PnP or pnpm with hoisting issues: Just use npm and save yourself the pain. pnpm will give you ENOENT: no such file or directory errors that make no sense

The "Simple" Config That Isn't Simple:

When the basic setup fails (and it will), you'll need this mess in next.config.js:

module.exports = {
  turbopack: {
    rules: {
      // This took forever to get working
      '*.svg': {
        loaders: ['@svgr/webpack'],
        as: '*.js',
      },
      // Custom fonts break without this
      '*.woff2': {
        loaders: ['file-loader'],
        as: '*.woff2',
      },
    },
    resolveAlias: {
      // Because your import paths are probably fucked
      '@components': './src/components',
      '@utils': './src/utils',
    },
    resolveExtensions: ['.mdx', '.tsx', '.ts', '.jsx', '.js', '.json'],
  },
}

Debugging When It Breaks:

Enable tracing because the error messages are useless as always:

NEXT_TURBOPACK_TRACING=1 next dev --turbopack

This dumps a .next/trace-turbopack file you can attach to GitHub issues when asking for help. Pro tip: if you get thread 'main' panicked at 'already borrowed: BorrowMutError', just delete node_modules and .next and try again. Half the problems go away with the nuclear option.

Time Investment Reality:

  • Basic app: 10 minutes if you're lucky and have zero custom config, otherwise plan for an afternoon of debugging
  • App with custom webpack config: Plan a weekend. I'm not joking - check the compatibility matrix or prepare to debug webpack plugin hell for 8 hours
  • Complex monorepo setup: Maybe just stick with webpack for now, I learned this the hard way

Test thoroughly on staging before touching production. The beta label exists for a reason - check current known issues first.

After going through this migration hell multiple times, I keep getting the same questions from colleagues. Here's what I wish someone had told me.

Frequently Asked Questions

Q

Is Turbopack actually production-ready or just hype?

A

Production builds are still in beta

  • over a year later they're still not stable.

Dev mode works fine and has been stable for a while. Vercel runs it on their own shit like vercel.com, v0.app, and nextjs.org in production.That's actual production usage, not just marketing. But "beta" means bugs exist

  • we're using it on staging, waiting for stable before moving critical production workloads.
Q

Can I ditch Next.js and use Turbopack standalone?

A

Nope, you're locked into Next.js for now. The core bundler is framework-agnostic but they're focusing on Next.js stability first. Standalone usage is "planned for future releases" which could mean next year or never

  • you know how these things go.If you need non-Next.js bundling, stick with webpack/Vite/esbuild for now.
Q

Turbopack vs Vite - which is actually faster?

A

Depends on what you're measuring and your specific app. Real benchmarks show:

  • Vite wins page navigation (0.5s vs 9s) because it doesn't pre-bundle everything
  • Turbopack wins hard refreshes (0.9s vs 2.4s) and cold starts on large apps
  • Both beat webpack but your mileage varies based on project size and custom config

The bigger your app, the more Turbopack's incremental architecture helps. Small projects might prefer Vite's instant startup.

Q

What about webpack plugins - am I screwed?

A

Turbopack doesn't support webpack plugins - only loaders through config. If you're using Bundle Analyzer, Circular Dependency Plugin, or literally any webpack plugin that isn't a basic loader, you're screwed until they build alternatives.

"Working on alternatives" means it'll be months or years. If your build depends on custom plugins, stick with webpack for now.

Q

Will Next.js eventually ditch webpack completely?

A

Probably, but they're promising webpack won't disappear overnight. Turbopack will stay opt-in until it's stable, then likely become the default in a major version.

Webpack support will continue "for the foreseeable future" but we know how that goes - eventually they'll deprecate it. Plan accordingly.

Q

Is the 700x faster claim actually real?

A

Developer Waiting Time Wasted

The 700x claim only applies with 30k+ modules and perfect lab conditions. Real-world performance is more honest:

  • My experience: ~2-5x faster HMR on a 200k LOC app, which is still solid
  • Cold builds: Maybe 2-3x faster, not the wild claims. Still waiting 2 minutes instead of 5
  • Your experience: Will vary wildly based on project size, webpack config complexity, and whether you're running on Docker/WSL2 (which slows everything the fuck down)

The improvements are real but not as dramatic as the marketing suggests. Still worth switching though.

Q

Does Turbopack work with TypeScript?

A

Type

Script works fine through SWC, but it doesn't type-check while building

  • run tsc --watch separately or your IDE will catch errors. They skip type-checking during builds to keep things fast.
Q

Can I use Turbopack with existing CSS frameworks?

A

Turbopack supports popular CSS frameworks out of the box. Tailwind CSS works through PostCSS processing, CSS Modules are natively supported via Lightning CSS, and Sass/SCSS compilation is built into Next.js. Most existing CSS workflows should work without modification.

Q

What about bundle sizes and optimization?

A

Bundle sizes are usually the same or smaller than webpack. Missing some of webpack's advanced optimizations like Inner Graph stuff, but they're working on it.

Q

Is there a performance cost to the Rust architecture?

A

Nah, Rust is actually faster because of better memory handling and parallelization. Installing Next.js takes a bit longer (compiling Rust code), but runtime builds are way faster than JavaScript tools.

Q

How do I debug issues with Turbopack?

A

Enable tracing for performance issues: NEXT_TURBOPACK_TRACING=1 next dev --turbopack. This generates a .next/trace-turbopack file for GitHub issue reports. For general issues, check the Next.js discussions and issue tracker.

Q

Will my existing Next.js app work with Turbopack?

A

Most Next.js applications work immediately with next dev --turbopack. Applications using custom webpack configuration, plugins, or edge-case CSS Modules features may require migration. The Next.js team maintains a comprehensive compatibility guide with known gaps and workarounds.

Everyone's trying to figure out if Turbopack is just another shiny tool or if it actually represents the future of JavaScript bundling. Fair question - time will tell.

Will Turbopack Actually Replace Webpack? (Probably, Eventually)

Everyone's rewriting JavaScript tools in Rust now. Sometimes it's just hype (looking at you, Rome/Biome), sometimes it actually matters. Turbopack might be in the "actually matters" category, but let's be realistic about the timeline.

Where We Are Now (September 2025)

Production builds went to beta over a year ago. Still in beta. That's... not super encouraging, but "beta" means "don't bet your company on it yet." The dev team is working on:

Persistent Caching: Right now Turbopack only caches in memory, so every cold start rebuilds everything. They're adding disk-based persistence for instant restarts. This will be huge when it works.

Memory Usage: Function-level caching sounds great until your laptop runs out of RAM. They're improving cache eviction so it doesn't eat 8GB on large projects.

Missing Optimizations: Webpack's Inner Graph Optimization and advanced tree shaking aren't implemented yet. Bundle sizes are comparable but not better than webpack's best output.

The Great Rust Rewrite Trend

The JavaScript ecosystem is having its Rust moment. Some tools deliver on the promises, others are just hype:

  • SWC (Speedy Web Compiler) - actually faster than Babel, widely adopted
  • Rome/Biome (biomejs.dev) - overpromised, underdelivered, forked and rebranded
  • esbuild (Go, not Rust) - proved native tooling works, inspired everything else
  • Rolldown (Rust Rollup) - in development, might matter if they ship
  • Lightning CSS (lightningcss.dev) - fast PostCSS replacement, used by Turbopack

Pattern: Native tooling helps, but shipping working software matters more than the language choice.

Enterprise Reality Check

Vercel using Turbopack on their own sites is genuine validation, not marketing fluff. But "enterprise adoption" means banks and insurance companies, not just Vercel's Next.js sites.

Real enterprise benefits:

  • Faster CI/CD: 2-3x faster builds save money on GitHub Actions minutes
  • Developer productivity: Less waiting around, more actual coding
  • Future scaling: Won't hit performance walls as fast as webpack does

But enterprises move slowly. Most will wait for stable releases and proven track records before migrating critical systems.

Migration Strategy Reality

The "gradual adoption" story is mostly true. You can try dev mode immediately, production builds when ready. The webpack compatibility layer handles basic configs.

But "gradual" becomes "painful" with custom webpack plugins, complex CSS setups, or monorepo configurations. Plan for weeks of migration time, not hours.

What Actually Happens Next

Turbopack becomes webpack's successor if they deliver on:

  • Stable production builds (maybe Q1 2026? who knows)
  • Standalone usage outside Next.js (timeline unknown, could be never)
  • Plugin ecosystem that doesn't suck (years away, if ever)

Until then, it's a Next.js-specific performance boost. That's still valuable, but not the universal webpack replacement yet.

The real win? Proof that rewriting JavaScript tools in Rust actually works. That trend continues regardless of whether Turbopack specifically wins.

Bottom line: If you're on Next.js and tired of slow builds, try Turbopack today for development. It works, it's fast, and worst case you flip it off with one flag. For production, wait another 6 months - the beta warning exists for a reason, and I've seen too many "it worked in dev" disasters to count.

Don't expect it to solve every webpack problem overnight though. Some pain is inherent to complex build tooling, no matter what language it's written in. But at least your builds won't take fucking forever anymore.

Related Tools & Recommendations

review
Similar content

Vite vs Webpack vs Turbopack: Build Tool Performance Review

I tested all three on 6 different projects so you don't have to suffer through webpack config hell

Vite
/review/vite-webpack-turbopack/performance-benchmark-review
100%
tool
Similar content

Vite: The Fast Build Tool - Overview, Setup & Troubleshooting

Dev server that actually starts fast, unlike Webpack

Vite
/tool/vite/overview
78%
tool
Similar content

Webpack: The Build Tool You'll Love to Hate & Still Use in 2025

Explore Webpack, the JavaScript build tool. Understand its powerful features, module system, and why it remains a core part of modern web development workflows.

Webpack
/tool/webpack/overview
67%
tool
Similar content

Webpack Performance Optimization: Fix Slow Builds & Bundles

Optimize Webpack performance: fix slow builds, reduce giant bundle sizes, and implement production-ready configurations. Improve app loading speed and user expe

Webpack
/tool/webpack/performance-optimization
59%
tool
Recommended

Stripe Terminal React Native SDK - Turn Your App Into a Payment Terminal That Doesn't Suck

compatible with Stripe Terminal React Native SDK

Stripe Terminal React Native SDK
/tool/stripe-terminal-react-native-sdk/overview
24%
tool
Recommended

React Error Boundaries Are Lying to You in Production

compatible with React Error Boundary

React Error Boundary
/tool/react-error-boundary/error-handling-patterns
24%
integration
Recommended

Claude API React Integration - Stop Breaking Your Shit

Stop breaking your Claude integrations. Here's how to build them without your API keys leaking or your users rage-quitting when responses take 8 seconds.

Claude API
/integration/claude-api-react/overview
24%
integration
Recommended

Stop Your APIs From Breaking Every Time You Touch The Database

Prisma + tRPC + TypeScript: No More "It Works In Dev" Surprises

Prisma
/integration/prisma-trpc-typescript/full-stack-architecture
24%
tool
Recommended

TypeScript - JavaScript That Catches Your Bugs

Microsoft's type system that catches bugs before they hit production

TypeScript
/tool/typescript/overview
24%
tool
Recommended

JavaScript to TypeScript Migration - Practical Troubleshooting Guide

This guide covers the shit that actually breaks during migration

TypeScript
/tool/typescript/migration-troubleshooting-guide
24%
tool
Popular choice

Amazon SageMaker - AWS's ML Platform That Actually Works

AWS's managed ML service that handles the infrastructure so you can focus on not screwing up your models. Warning: This will cost you actual money.

Amazon SageMaker
/tool/aws-sagemaker/overview
21%
news
Popular choice

Anthropic Raises $13B at $183B Valuation: AI Bubble Peak or Actual Revenue?

Another AI funding round that makes no sense - $183 billion for a chatbot company that burns through investor money faster than AWS bills in a misconfigured k8s

/news/2025-09-02/anthropic-funding-surge
20%
tool
Recommended

Turborepo - Make Your Monorepo Builds Not Suck

Finally, a build system that doesn't rebuild everything when you change one fucking line

Turborepo
/tool/turborepo/overview
20%
compare
Recommended

Nx vs Turborepo: Which One Actually Sucks Less?

After 8 months in monorepo hell, here's what actually works

Nx
/compare/nx/turborepo/build-performance-comparison
20%
compare
Recommended

Pick Your Monorepo Poison: Nx vs Lerna vs Rush vs Bazel vs Turborepo

Which monorepo tool won't make you hate your life

Nx
/compare/nx/lerna/rush/bazel/turborepo/monorepo-tools-comparison
20%
tool
Popular choice

Node.js Production Deployment - How to Not Get Paged at 3AM

Optimize Node.js production deployment to prevent outages. Learn common pitfalls, PM2 clustering, troubleshooting FAQs, and effective monitoring for robust Node

Node.js
/tool/node.js/production-deployment
19%
alternatives
Popular choice

Docker Alternatives for When Docker Pisses You Off

Every Docker Alternative That Actually Works

/alternatives/docker/enterprise-production-alternatives
18%
howto
Popular choice

How to Run LLMs on Your Own Hardware Without Sending Everything to OpenAI

Stop paying per token and start running models like Llama, Mistral, and CodeLlama locally

Ollama
/howto/setup-local-llm-development-environment/complete-setup-guide
17%
compare
Recommended

MetaMask vs Coinbase Wallet vs Trust Wallet vs Ledger Live - Which Won't Screw You Over?

I've Lost Money With 3 of These 4 Wallets - Here's What I Learned

MetaMask
/compare/metamask/coinbase-wallet/trust-wallet/ledger-live/security-architecture-comparison
17%
tool
Recommended

Rust - Systems Programming for People Who Got Tired of Debugging Segfaults at 3AM

Memory safety without garbage collection, but prepare for the compiler to reject your shit until you learn to think like a computer

Rust
/tool/rust/overview
17%

Recommendations combine user behavior, content similarity, research intelligence, and SEO optimization