-
Notifications
You must be signed in to change notification settings - Fork 27.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not warn during build for supported modules in the Edge runtime (#…
…74752) When using a Node.js module that is [supported in the Edge runtime](https://vercel.com/docs/functions/runtimes/edge-runtime#compatible-node.js-modules), we must not emit a warning during build.
- Loading branch information
1 parent
6c52257
commit 5bd025d
Showing
4 changed files
with
24 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
test/e2e/app-dir/edge-runtime-node-compatibility/middleware.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { NextResponse, NextRequest } from 'next/server' | ||
import { AsyncLocalStorage } from 'async_hooks' | ||
|
||
const storage = new AsyncLocalStorage<{}>() | ||
|
||
export async function middleware(request: NextRequest) { | ||
storage.run({}, () => {}) | ||
|
||
return NextResponse.next() | ||
} |
26 changes: 0 additions & 26 deletions
26
test/e2e/app-dir/edge-runtime-node-compatibility/tsconfig.json
This file was deleted.
Oops, something went wrong.