本文へスキップ
Kitbay
スキル

react-vendoring

MIT2026年11月11日 更新143,470GitHubスター

A maintainer skill in the Next.js repository about how the framework bundles its own copy of React and keeps server-only React code apart.

スキルの内容

A maintainer skill in the Next.js repository about how the framework bundles its own copy of React and keeps server-only React code apart. It applies when work touches the vendored React packages, the entry-base file, the internal type declarations for compiled modules or the build task that copies React. It explains that the App Router uses the bundled React while the Pages Router uses the installed one, that Flight server imports may appear only in entry-base and reach other code through a module parameter, and how to add a Node-only React API in three steps. It also covers placement of lint suppressions and notes that Turbopack silently swaps the webpack Flight package for its own.

できること

  • Explain where Next.js loads React from
  • Keep Flight server imports inside entry-base
  • Add a Node-only React API safely
  • Place lint suppressions for guarded requires