From b513b2954a7a42588bf176ec8d4ce82c2986abee Mon Sep 17 00:00:00 2001 From: Ferid Zuber Date: Wed, 20 Sep 2023 19:38:41 +0300 Subject: [PATCH] Fix Issue #6382 Firebase not working for NextJs >=v13.5.0 Fixes https://github.com/firebase/firebase-tools/issues/6382 Due to braking changes on the signature of loadConfig (https://github.com/vercel/next.js/blob/d96e0258de2caf34e9322d0d32ab5748533c4465/packages/next/src/server/config.ts#L784) Firebase does not deploy correctly. --- src/frameworks/next/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frameworks/next/index.ts b/src/frameworks/next/index.ts index ab4c047bc2e..852e9329755 100644 --- a/src/frameworks/next/index.ts +++ b/src/frameworks/next/index.ts @@ -594,7 +594,7 @@ async function getConfig( if (gte(version, "12.0.0")) { const { default: loadConfig } = relativeRequire(dir, "next/dist/server/config"); const { PHASE_PRODUCTION_BUILD } = relativeRequire(dir, "next/constants"); - config = await loadConfig(PHASE_PRODUCTION_BUILD, dir, null); + config = await loadConfig(PHASE_PRODUCTION_BUILD, dir); } else { try { config = await import(pathToFileURL(join(dir, "next.config.js")).toString());