dce-edge
vercel · Other
安全的require()模式和边缘运行时约束。在编写条件require()调用、保护Node-only导入(如node:stream等),或编辑define-env-plugin.ts / app-render / stream-utils以适配边缘构建时使用。涵盖webpack DCE的if/else分支、TypeScript明确赋值、NEXT_RUNTIME与真实特性标志的区别,以及在define-env.ts中强制标志为false以适配边缘环境。
DCE-safe require() patterns and edge runtime constraints. Use when writing conditional require() calls, guarding Node-only imports (node:stream etc.), or editing define-env-plugin.ts / app-render / stream-utils for edge builds. Covers if/else branching for webpack DCE, TypeScript definite assignment, the NEXT_RUNTIME vs real feature flag distinction, and forcing flags false for edge in define-env.ts.
npx skills add https://github.com/vercel/next.js --skill dce-edge
星标 139957 · 安装量 0