From 7730ee1c3848d0e1a1fa6c0d43a4e7f700cc05a0 Mon Sep 17 00:00:00 2001 From: Shu Ding Date: Mon, 8 May 2023 21:33:55 +0200 Subject: [PATCH] Add request-async-storage to the shared layer (#49470) This should fix the `requestAsyncStorage not available` error. [Related report](https://vercel.slack.com/archives/C03S8ED1DKM/p1683553422581859). --- packages/next/src/build/webpack-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next/src/build/webpack-config.ts b/packages/next/src/build/webpack-config.ts index ef9934051993d..97e4b96e4c16a 100644 --- a/packages/next/src/build/webpack-config.ts +++ b/packages/next/src/build/webpack-config.ts @@ -89,7 +89,7 @@ const babelIncludeRegexes: RegExp[] = [ const reactPackagesRegex = /^(react|react-dom|react-server-dom-webpack)($|\/)/ const asyncStoragesRegex = - /next[\\/]dist[\\/]client[\\/]components[\\/](static-generation-async-storage|action-async-storage)/ + /next[\\/]dist[\\/]client[\\/]components[\\/](static-generation-async-storage|action-async-storage|request-async-storage)/ const mainFieldsPerCompiler: Record = { [COMPILER_NAMES.server]: ['main', 'module'],