Next.js Discord

Discord Forum

What runtime does Next use for middleware locally?

Answered
American black bear posted this in #help-forum
Open in Discord
Avatar
American black bearOP
I'm trying to understand the runtime environment for Next.js middleware:

In local development mode (next dev), does Next.js run middleware in a Node.js environment or an Edge runtime simulator?
Answered by Clown
It uses Edge locally and on production
View full answer

2 Replies

Avatar
It uses Edge locally and on production
Answer
Avatar
American black bearOP
Okay, great, thanks