From ca90d2b1c988ce274ab726b3819861c9bc1de62e Mon Sep 17 00:00:00 2001 From: Jacob Fletcher Date: Wed, 2 Oct 2024 12:38:49 -0400 Subject: [PATCH] fix: properly resolves cjs withPayload export (#8521) Importing `withPayload` as CommonJS using `require` does not properly resolve. This was because the exported file path was using the `.cjs` extension instead of `.js`. --- packages/next/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next/package.json b/packages/next/package.json index 5a805f093..a46c1e57c 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -126,7 +126,7 @@ }, "./withPayload": { "import": "./dist/withPayload.js", - "require": "./dist/cjs/withPayload.cjs", + "require": "./dist/cjs/withPayload.js", "default": "./dist/withPayload.js" }, "./layouts": {