本文へスキップ
Kitbay
スキル

dce-edge

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

A maintainer skill in the Next.js repository with coding rules for conditional require calls that bundlers can remove, and for the limits of the edge runtime.

スキルの内容

A maintainer skill in the Next.js repository with coding rules for conditional require calls that bundlers can remove, and for the limits of the edge runtime. It explains that webpack drops a require only in the dead branch of an if/else that its define plugin can resolve at build time, shows a switcher file pattern that picks a Node or web implementation, warns that the runtime variable is not a feature flag, and says how flags that guard Node-only imports must be forced off for edge builds. It closes with rules for the app page template and a standalone end-to-end test to run when edge bundling may have regressed.

できること

ドキュメントに記載なし