Next.js Build Tools (Turbopack and SWC Compiler)
Installation
SKILL.md
Next.js Build Tools (Turbopack and SWC Compiler)
Expert guidance on Turbopack in Next.js — default bundler, configuration, supported features, webpack differences, performance tracing, and migration.
@doc-version: 16.2.6
Core Concepts
Turbopack เป็น incremental bundler เขียนด้วย Rust, built into Next.js:
- Default bundler ตั้งแต่ Next.js 16
- Unified graph — single graph สำหรับ client + server
- Incremental — cache results ถึง function level, ไม่ทำซ้ำ
- Lazy bundling — bundle เฉพาะที่ request จริง
- Parallel — ใช้ทุก CPU cores
Getting Started
Turbopack เป็น default — ไม่ต้อง config: