Does your NPM package run at Edge?
summary
Demonstrates that an NPM package can run on Node, Cloudflare Workers, Vercel Edge Runtime and Deno by using conditional exports and subpath imports to provide runtime-specific entry points (one folder per runtime) while avoiding default exports and the dual package hazard; shows Clerk’s auth library compiled once to run in browser, Node and Edge, polyfilling fetch with node_fetch/native (node-fetch has ~5M daily downloads) and using WinterCG API keys to keep behavior consistent.
AI-written summary · about
chapters (5)
- 0:00Introduction
- 7:30ESM modules evolution
- 11:24JavaScript runtimes today
- 14:12Building for all runtimes
- 17:41Edge compatibility solutions
related talks
32mPushing boundaries to the edge
40mIt's Not Just Node.js Anymore
38mBuilding a Framework for the Edge
24m[Eng Sub]Deno: Next Generation JavaScript Runtime
25mNext-Gen Server JavaScript: Web Standards
23mDinos and Clouds: Node apps for Deno and Cloudflare Workers
24mPublishing in the JavaScript Ecosystem & Keeping Users Happy
15mWrite once, run anywhere - cross-env JS
