turbopack

Configure and troubleshoot the Turbopack bundler in Next.js projects.

Updated Jul 31, 2026
One-click install
npx skills add https://github.com/AarnavBaddam/skills --skill turbopack-aarnavbaddam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: turbopack
Source: https://github.com/AarnavBaddam/skills/tree/main/turbopack
Command: npx skills add https://github.com/AarnavBaddam/skills --skill turbopack-aarnavbaddam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Migrating to or configuring Turbopack in Next.js raises practical questions: webpack loaders stop working, CSS ordering changes, config keys move, and build or HMR issues need systematic debugging. This Skill provides expert guidance for all of these scenarios. ## Core Features & Use Cases - Configuration Guidance: Set up top-level turbopack config in Next.js 16, including resolveAlias, resolveExtensions, and custom turbopack.rules for loaders like @svgr/webpack. - Webpack Migration: Map common webpack loaders (css-loader, sass-loader, file-loader, raw-loader) to Turbopack built-ins or equivalents, and know when to fall back to webpack. - Build & Performance Diagnostics: Profile HMR and builds with NEXT_TURBOPACK_TRACING, diagnose large bundles with the built-in analyzer, and fix environment boundary errors using the server-only package. - Use Case: Your Next.js build fails after switching to Turbopack because a custom webpack loader is unsupported. Use this Skill to identify the equivalent turbopack.rules configuration or determine when to opt back into webpack. ## Quick Start Ask the Turbopack skill how to migrate your webpack SVG loader configuration to Turbopack in your next.config file.

Frequently Asked Questions about turbopack

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

FAQPage Schema
How do I migrate webpack loaders to Turbopack in Next.js?

Most common loaders like css-loader, sass-loader, and postcss-loader have built-in Turbopack equivalents and can be removed. For loaders without built-ins, configure turbopack.rules in next.config, for example mapping '*.svg' to @svgr/webpack.

Turbopack vs Webpack: which bundler should I use in Next.js 16?

Turbopack is the default in Next.js 16 with constant-time HMR, native RSC support, and built-in CSS handling. Choose webpack only when you depend on custom loaders or plugins with no Turbopack equivalent, such as ModuleFederationPlugin.

Does Turbopack support Sass and Tailwind CSS?

Yes. Install the sass package and import .scss files directly, and Turbopack compiles them natively. Tailwind CSS v4 works with zero config through your existing postcss.config.js, which Turbopack reads automatically.

Why does my Turbopack build fail with module not found errors?

Build failures often come from custom webpack resolution that Turbopack ignores. Move aliases to turbopack.resolveAlias in next.config, remove any webpack() function, and verify custom turbopack.rules reference installed loaders.

How do I profile slow Turbopack builds or HMR?

Run next dev or next build with NEXT_TURBOPACK_TRACING=1 to write a trace.json file. Open it in chrome://tracing or Perfetto to inspect module-level timing, slow transforms, and cache misses.

When should I fall back to webpack instead of Turbopack?

Fall back when a required webpack loader or plugin has no Turbopack equivalent, such as complex ModuleFederationPlugin setups. Set bundler: 'webpack' in next.config and file a parity request on the Next.js GitHub repository.