netlify-edge-functions
Installation
SKILL.md
Netlify Edge Functions
Modern syntax (reach for this)
Export a default handler plus a config object. Import Config/Context types from @netlify/edge-functions; Request/Response/URL are global.
import type { Config, Context } from "@netlify/edge-functions";
export default async (request: Request, context: Context) => {
return new Response("Hello world");
};
export const config: Config = {
path: "/test",
};
Do not hand-write an edge function when your framework's adapter already generates middleware for the job — duplicating it causes conflicts. Check the framework adapter/reference first.