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.
This commit is contained in:
barsa 2026-01-05 19:03:18 +09:00
parent c37bdd2b9c
commit 0f1c134bc9

View File

@ -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"),