PluginBench
Skill
Pass
Audit score 90

nextjs-turbopack

affaan-m/everything-claude-code

Next.js 16+ incremental bundler with Rust-powered Turbopack for faster dev startup and HMR.

What is nextjs-turbopack?

Turbopack is the default bundler for Next.js 16+ local development, offering incremental bundling and file-system caching for significantly faster cold starts and hot module reloads. Use it for day-to-day development unless you hit a Turbopack bug or need a webpack-only plugin.

  • Incremental bundling with file-system caching for faster dev restarts (5–14x speedup on large projects)
  • Default bundler for `next dev` in Next.js 16+; no extra config needed for basic use
  • Hot Module Reload (HMR) optimized for large applications
  • Experimental Bundle Analyzer (Next.js 16.1+) to inspect and optimize output
  • Fallback to webpack via `--webpack` flag if needed for compatibility

How to install nextjs-turbopack

npx skills add https://github.com/affaan-m/everything-claude-code --skill nextjs-turbopack
Prerequisites
  • Next.js 16 or later installed
  • Node.js and npm/yarn/pnpm
Claude Code
Cursor
Windsurf
Cline

How to use nextjs-turbopack

  1. 1.Run `next dev` to start local development with Turbopack (default)
  2. 2.Monitor dev startup time and HMR speed; if slow, verify Turbopack is enabled and cache is not being cleared
  3. 3.Use the Bundle Analyzer (see Next.js docs for your version) to inspect output and identify optimization opportunities
  4. 4.If you hit a Turbopack bug, disable with `--webpack` flag and report the issue
  5. 5.For production builds, run `next build` and check official Next.js docs for your version's bundler behavior

Use cases

Good for
  • Speed up local development startup and hot updates in large Next.js applications
  • Diagnose slow dev startup or HMR performance issues
  • Inspect bundle composition and identify heavy dependencies using Bundle Analyzer
  • Migrate from webpack to Turbopack for faster iteration cycles
  • Optimize production bundles by analyzing code-splitting opportunities
Who it's for
  • Next.js 16+ developers
  • Full-stack engineers optimizing build performance
  • Teams with large codebases experiencing slow dev startup
  • Developers debugging bundle size and dependency issues

nextjs-turbopack FAQ

Is Turbopack enabled by default in Next.js 16+?

Yes. `next dev` uses Turbopack by default in Next.js 16+. You can disable it with the `--webpack` flag if needed for compatibility.

What is the middleware filename in Next.js 16?

Next.js 16 uses `proxy.ts` at the project root, replacing the older `middleware.ts` convention. Do not rename it to `middleware.ts` as that will break middleware execution.

How much faster is Turbopack than webpack?

Turbopack can provide 5–14x speedup on large projects due to incremental bundling and file-system caching, though results vary by project size and complexity.

Where is the Turbopack cache stored?

The file-system cache is typically stored under `.next` and is automatically managed; no extra configuration is needed for basic use.

Can I use webpack in production with Next.js 16+?

Production build behavior depends on your Next.js version. Check the official Next.js docs for your release to confirm whether `next build` uses Turbopack or webpack.

Full instructions (SKILL.md)

Source of truth, from affaan-m/everything-claude-code.


name: nextjs-turbopack description: Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack. metadata: origin: ECC

Next.js and Turbopack

Next.js 16+ uses Turbopack by default for local development: an incremental bundler written in Rust that significantly speeds up dev startup and hot updates.

When to Use

  • Turbopack (default dev): Use for day-to-day development. Faster cold start and HMR, especially in large apps.
  • Webpack (legacy dev): Use only if you hit a Turbopack bug or rely on a webpack-only plugin in dev. Disable with --webpack (or --no-turbopack depending on your Next.js version; check the docs for your release).
  • Production: Production build behavior (next build) may use Turbopack or webpack depending on Next.js version; check the official Next.js docs for your version.

Use when: developing or debugging Next.js 16+ apps, diagnosing slow dev startup or HMR, or optimizing production bundles.

How It Works

  • Turbopack: Incremental bundler for Next.js dev. Uses file-system caching so restarts are much faster (e.g. 5–14x on large projects).
  • Default in dev: From Next.js 16, next dev runs with Turbopack unless disabled.
  • File-system caching: Restarts reuse previous work; cache is typically under .next; no extra config needed for basic use.
  • Bundle Analyzer (Next.js 16.1+): Experimental Bundle Analyzer to inspect output and find heavy dependencies; enable via config or experimental flag (see Next.js docs for your version).

Examples

Commands

next dev
next build
next start

Usage

Run next dev for local development with Turbopack. Use the Bundle Analyzer (see Next.js docs) to optimize code-splitting and trim large dependencies. Prefer App Router and server components where possible.

Middleware File Naming

Next.js 16 introduced proxy.ts as the middleware filename, replacing the older middleware.ts convention:

  • Next.js 16+: use proxy.ts at the project root
  • Pre-Next.js 16: use middleware.ts at the project root

The filename change is tied to the Next.js version, not to which bundler (Turbopack or webpack) is in use. Always check the official docs for the version you are reviewing.

Do not flag proxy.ts as a misnamed or missing middleware file in Next.js 16 projects. The file is correct and intentional. Suggesting a rename to middleware.ts will break middleware execution.

Reference: Next.js proxy docs

Best Practices

  • Stay on a recent Next.js 16.x for stable Turbopack and caching behavior.
  • If dev is slow, ensure you're on Turbopack (default) and that the cache isn't being cleared unnecessarily.
  • For production bundle size issues, use the official Next.js bundle analysis tooling for your version.