From 0f1c134bc924ddc84db9f1db0070f9c95c66fd27 Mon Sep 17 00:00:00 2001 From: barsa Date: Mon, 5 Jan 2026 19:03:18 +0900 Subject: [PATCH] Update Next.js Configuration to Support Monorepo Package Bundling - Added `transpilePackages` configuration in `next.config.mjs` to ensure proper bundling of the `@customer-portal/domain` package in the monorepo setup, enhancing build efficiency and compatibility. --- apps/portal/next.config.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/portal/next.config.mjs b/apps/portal/next.config.mjs index 0b6f98b1..5ebe63a0 100644 --- a/apps/portal/next.config.mjs +++ b/apps/portal/next.config.mjs @@ -14,6 +14,9 @@ const useDirectApiBase = Boolean(directApiBase && directApiBase.trim().startsWit const nextConfig = { output: process.env.NODE_ENV === "production" ? "standalone" : undefined, + // Required for monorepo workspace packages to be bundled correctly + transpilePackages: ["@customer-portal/domain"], + turbopack: { resolveAlias: { "@customer-portal/domain": path.join(workspaceRoot, "packages/domain/dist"),