Zum Inhalt springen
Kitbay
Skill

dce-edge

MITAktualisiert am 11. Nov. 2026143.470GitHub-Sterne

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.

Was der Skill vermittelt

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.

Funktionen

In der Dokumentation nicht angegeben