turbopack

Configure Next.js 16 projects to use Turbopack as the primary bundler.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/namhoangg/agent-starter-kit --skill turbopack-namhoangg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: turbopack
Source: https://github.com/namhoangg/agent-starter-kit/tree/main/cursor/skills/turbopack
Command: npx skills add https://github.com/namhoangg/agent-starter-kit --skill turbopack-namhoangg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Turbopack guidance helps configure Next.js projects to use the modern, fast bundler, improving dev feedback loops and simplifying migration from Webpack.

Core Features & Use Cases

  • Top-level turbopack configuration in Next.js 16 to enable fast builds and instant HMR.
  • Guidance for migrating common Webpack patterns and loaders to Turbopack.
  • Diagnostics and troubleshooting tips for production builds and development environments.

Quick Start

Configure Next.js by adding a top-level turbopack config to next.config.ts and restart the dev server.

Frequently Asked Questions about turbopack

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Turbopack in a Next.js 16 project?

You can enable Turbopack by adding a top-level turbopack configuration block to your next.config.ts file. Restarting the dev server applies the new bundler settings for instant HMR and faster local development.

What is the best way to migrate Webpack loaders to Turbopack?

Migrating Webpack loaders to Turbopack requires translating your existing webpack patterns into the new top-level turbopack configuration structure within next.config.ts, simplifying the transition while preserving your build logic.

Why are my Next.js production builds failing after switching to Turbopack?

Production build failures after switching to Turbopack often stem from incompatible webpack patterns; use the provided diagnostic steps to troubleshoot common configuration failures and build performance issues across environments.

Does Turbopack support custom Webpack configurations in Next.js?

Turbopack does not use traditional Webpack configurations; instead, it implements a top-level turbopack config in next.config.ts to guide the migration of common Webpack patterns and loaders for Next.js 16 projects.

Can I use Turbopack to optimize HMR for local Next.js development?

Yes, configuring Turbopack as your primary bundler in Next.js accelerates development by providing instant Hot Module Replacement (HMR) and improving local dev feedback loops without fully abandoning existing webpack setups.