Turbopack — Rust-Powered Bundler for Next.js

You are an expert in Turbopack, the Rust-based successor to Webpack built by Vercel. You help developers configure and optimize Turbopack for Next.js applications, achieving 10x faster cold starts and near-instant Hot Module Replacement (HMR) — replacing Webpack's JavaScript-based bundling with a parallelized, incremental Rust engine that scales to massive codebases.

25 stars

Best use case

Turbopack — Rust-Powered Bundler for Next.js is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

You are an expert in Turbopack, the Rust-based successor to Webpack built by Vercel. You help developers configure and optimize Turbopack for Next.js applications, achieving 10x faster cold starts and near-instant Hot Module Replacement (HMR) — replacing Webpack's JavaScript-based bundling with a parallelized, incremental Rust engine that scales to massive codebases.

Teams using Turbopack — Rust-Powered Bundler for Next.js should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/turbopack/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/TerminalSkills/skills/turbopack/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/turbopack/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Turbopack — Rust-Powered Bundler for Next.js Compares

Feature / AgentTurbopack — Rust-Powered Bundler for Next.jsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

You are an expert in Turbopack, the Rust-based successor to Webpack built by Vercel. You help developers configure and optimize Turbopack for Next.js applications, achieving 10x faster cold starts and near-instant Hot Module Replacement (HMR) — replacing Webpack's JavaScript-based bundling with a parallelized, incremental Rust engine that scales to massive codebases.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Turbopack — Rust-Powered Bundler for Next.js

You are an expert in Turbopack, the Rust-based successor to Webpack built by Vercel. You help developers configure and optimize Turbopack for Next.js applications, achieving 10x faster cold starts and near-instant Hot Module Replacement (HMR) — replacing Webpack's JavaScript-based bundling with a parallelized, incremental Rust engine that scales to massive codebases.

## Core Capabilities

### Next.js Configuration

```typescript
// next.config.ts — Enable Turbopack
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  // Turbopack is the default dev bundler in Next.js 15+
  // For production builds (experimental):
  experimental: {
    turbo: {
      // Custom webpack loaders (Turbopack compatible)
      rules: {
        "*.svg": {
          loaders: ["@svgr/webpack"],
          as: "*.js",
        },
        "*.md": {
          loaders: ["raw-loader"],
          as: "*.js",
        },
      },
      // Module resolution aliases
      resolveAlias: {
        "old-package": "new-package",
        canvas: false,                     // Exclude server-only module
      },
      // Custom resolve extensions
      resolveExtensions: [".tsx", ".ts", ".jsx", ".js", ".json", ".mdx"],
    },
  },
};

export default nextConfig;
```

### Development

```bash
# Next.js 15+ uses Turbopack by default for dev
next dev                                  # Turbopack enabled automatically

# Explicit flags
next dev --turbopack                      # Force Turbopack
next build --turbopack                    # Experimental: production build

# Performance comparison (typical 10K module app):
# Webpack: cold start 8.2s, HMR 1.2s
# Turbopack: cold start 1.1s, HMR 12ms
```

### Turbo Tasks (Incremental Engine)

```
# Turbopack's architecture:
# 1. Function-level caching — only recomputes changed functions
# 2. Incremental computation — HMR rebuilds only affected modules
# 3. Parallel execution — Rust threads process modules concurrently
# 4. Lazy compilation — only bundles requested routes

# Result: HMR time stays constant regardless of app size
# 1,000 modules: 12ms HMR
# 50,000 modules: 14ms HMR (nearly unchanged)
```

## Installation

```bash
# Turbopack is built into Next.js 15+
npx create-next-app@latest                # Turbopack included
npm install next@latest                   # Upgrade existing project
```

## Best Practices

1. **Default in Next.js 15+** — Turbopack is the default dev server; no configuration needed
2. **Loader compatibility** — Most webpack loaders work via `turbo.rules`; SVGR, raw-loader, GraphQL loaders supported
3. **No webpack config** — Turbopack doesn't use webpack.config.js; migrate custom loaders to `turbo.rules`
4. **Lazy compilation** — Turbopack only compiles routes you visit; unused pages don't slow down dev server
5. **Persistent caching** — Turbopack caches between restarts; second startup is nearly instant
6. **Module resolution** — Use `resolveAlias` to redirect imports; replaces webpack's `resolve.alias`
7. **CSS support** — CSS Modules, PostCSS, Tailwind CSS work out of the box; no additional config
8. **Gradual migration** — Use Turbopack for dev, Webpack for production builds; switch to Turbopack builds when stable

Related Skills

zero-trust-config-helper

25
from ComeOnOliver/skillshub

Zero Trust Config Helper - Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category.

rust-mcp-server-generator

25
from ComeOnOliver/skillshub

Generate a complete Rust Model Context Protocol server project with tools, prompts, resources, and tests using the official rmcp SDK

next-intl-add-language

25
from ComeOnOliver/skillshub

Add new language to a Next.js + next-intl application

next-upgrade

25
from ComeOnOliver/skillshub

Upgrade Next.js to the latest version following official migration guides and codemods

next-cache-components

25
from ComeOnOliver/skillshub

Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag

next-best-practices

25
from ComeOnOliver/skillshub

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

ralph-tui-create-beads-rust

25
from ComeOnOliver/skillshub

Convert PRDs to beads for ralph-tui execution using beads-rust (br CLI). Creates an epic with child beads for each user story. Use when you have a PRD and want to use ralph-tui with beads-rust as the task source. Triggers on: create beads, convert prd to beads, beads for ralph, ralph beads, br beads.

ship-learn-next

25
from ComeOnOliver/skillshub

Transform learning content (like YouTube transcripts, articles, tutorials) into actionable implementation plans using the Ship-Learn-Next framework. Use when user wants to turn advice, lessons, or educational content into concrete action steps, reps, or a learning quest.

systems-programming-rust-project

25
from ComeOnOliver/skillshub

You are a Rust project architecture expert specializing in scaffolding production-ready Rust applications. Generate complete project structures with cargo tooling, proper module organization, testing

rust-pro

25
from ComeOnOliver/skillshub

Master Rust 1.75+ with modern async patterns, advanced type system features, and production-ready systems programming. Expert in the latest Rust ecosystem including Tokio, axum, and cutting-edge crates. Use PROACTIVELY for Rust development, performance optimization, or systems programming.

react-nextjs-development

25
from ComeOnOliver/skillshub

React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

nextjs-supabase-auth

25
from ComeOnOliver/skillshub

Expert integration of Supabase Auth with Next.js App Router Use when: supabase auth next, authentication next.js, login supabase, auth middleware, protected route.