Menu

1 / 2

Improved Node.js compatibility for Edge Middleware and Edge Functions - Vercel

Vercel News·Javi Velasco·9 days ago
#f1ZepMXw
#vercel#edge#functions#function#runtime
Reading 0:00
15s threshold

Note: This changelog entry is historical. Edge Functions are deprecated for new projects. Use Vercel Functions with the Node.js runtime and Fluid compute . Use Routing Middleware for request-time routing before a response completes.

Vercel Routing Middleware and Edge Functions now support more Node.js modules. You may want to make use of these modules directly, but many of these low-level APIs are pieces of core functionality that other modules depend on. Adding support for these APIs expands the compatibility of existing npm packages.

export default function ( request : Request ) {

const url = new URL ( request . url ) ;

const message = url . searchParams . get ( "message" ) ?? '' ;

return Response . json ( {

decoded : Buffer . from ( message , "base64" ) .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.