dce-edge

Official

DCE-safe edge runtime patterns

Authorvercel
Version1.0.0
Installs0

System Documentation

What problem does it solve?

DCE-safe require patterns and edge-runtime constraints help you write code that remains compatible with Next.js edge builds by preventing unsafe dynamic imports and ensuring dead-code elimination works as intended.

Core Features & Use Cases

  • DCE-safe conditional require patterns to allow webpack to prune dead branches.
  • TypeScript definite assignment patterns for edge-friendly code paths.
  • Compile-time switcher patterns to guard node vs web imports.
  • Guidance on NEXT_RUNTIME vs real feature flags and edge-specific guardrails.
  • Practical examples for app-page.ts and edge route scenarios.

Quick Start

Patch your code to guard Node-only imports with a proper DefinePlugin flag and verify edge builds using the provided webpack tests.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: dce-edge
Download link: https://github.com/vercel/next.js/archive/main.zip#dce-edge

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.