Communitygithub.com

ComeOnOliver/skillshub

Next.js 16+ と Turbopack — インクリメンタルバンドル、ファイルシステムキャッシュ、開発速度、そして Turbopack と webpack の使い分け

skillshub とは?

このスキルは、Next.js 16以上におけるTurbopackの活用方法を解説します。TurbopackはRustで記述されたインクリメンタルバンドラーであり、開発サーバーの起動やホットリロードを大幅に高速化します。主なメリットは、ファイルシステムキャッシュによる高速な再起動(大規模プロジェクトで5~14倍高速)と、Next.js 16以降のデフォルト開発モードとしての容易な利用です。開発時のトラブルシューティングや、Turbopackとwebpackを適切に使い分けるための判断基準、バンドル分析によるパフォーマンス最適化のヒントも提供します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/affaan-m/everything-claude-code/nextjs-turbopack

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Next.js と Turbopack

Next.js 16+ は、ローカル開発でデフォルトで Turbopack を使用します。Turbopack は Rust で書かれたインクリメンタルバンドラーで、開発の起動やホットリロードを大幅に高速化します。

いつ使用するか

  • Turbopack(デフォルト開発モード):日常の開発に最適です。特に大規模アプリケーションでのコールドスタートや HMR(Hot Module Replacement)が高速化されます。
  • Webpack(旧開発モード):Turbopack でエラーが発生する場合や、利用している webpack プラグインが開発時にのみ必要な場合に使用します。--webpack または --no-turbopack フラグで無効化できます(お使いの Next.js バージョンのドキュメントを参照してください)。
  • プロダクション環境:プロダクションビルド(next build)は、Next.js のバージョンに応じて Turbopack または webpack を使用します。お使いのバージョンの公式 Next.js ドキュメントをご確認ください。

適用シナリオ:Next.js 16+ アプリケーションの開発やデバッグ、開発起動や HMR の遅延の診断、プロダクションバンドルの最適化。

仕組み

  • Turbopack:Next.js 開発のためのインクリメンタルバンドラー。ファイルシステムキャッシュを活用するため、再起動が大幅に高速化されます(例:大規模プロジェクトで 5~14 倍高速)。
  • 開発環境でデフォルト有効:Next.js 16 以降、next dev は無効化されない限りデフォルトで Turbopack を使用します。
  • ファイルシステムキャッシュ:再起動時に以前の処理結果を再利用します。キャッシュは通常 .next ディレクトリに保存され、基本的な使用では追加設定は不要です。
  • バンドルアナライザー(Next.js 16.1+):出力を検査し、重い依存関係を特定するための実験的なバンドルアナライザーです。設定または実験的フラグで有効化できます(お使いの Next.js バージョンのドキュメントを参照してください)。

例

コマンド

next dev
next build
next start

使用方法

ローカル開発では next dev を実行して Turbopack を使用します。バンドルアナライザー(Next.js ドキュメント参照)を使用してコード分割を最適化し、大きな依存関係を除去してください。可能な限り App Router とサーバーコンポーネントを優先してください。

ベストプラクティス

  • 安定した Turbopack とキャッシュの動作を確保するため、最新の Next.js 16.x バージョンを維持してください。
  • 開発が遅い場合は、Turbopack(デフォルト)を使用していることと、キャッシュが不必要にクリアされていないことを確認してください。
  • プロダクションバンドルのサイズ問題については、お使いのバージョンの公式 Next.js バンドル分析ツールを使用してください。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Next.js 16+ uses App Router with Server Components by default. Client Components are only used when interactivity is needed (hooks, event handlers, browser APIs).

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

関連スキル