diff --git a/apps/web/next.config.js b/apps/web/next.config.js index cf5b03617dcff1..bbc93995ba2729 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -196,6 +196,8 @@ const nextConfig = (phase) => { experimental: { // externalize server-side node_modules with size > 1mb, to improve dev mode performance/RAM usage optimizePackageImports: ["@calcom/ui"], + webpackMemoryOptimizations: true, + webpackBuildWorker: true, }, productionBrowserSourceMaps: true, /* We already do type check on GH actions */ @@ -231,7 +233,15 @@ const nextConfig = (phase) => { images: { unoptimized: true, }, - webpack: (config, { webpack, buildId, isServer }) => { + webpack: (config, { webpack, buildId, isServer, dev }) => { + if (!dev) { + if (config.cache) { + config.cache = Object.freeze({ + type: "memory", + }); + } + } + if (isServer) { // Module not found fix @see https://github.com/boxyhq/jackson/issues/1535#issuecomment-1704381612 config.plugins.push( diff --git a/turbo.json b/turbo.json index f53c5d04155661..df3e9fd3c5dd56 100644 --- a/turbo.json +++ b/turbo.json @@ -250,7 +250,11 @@ "CAL_VIDEO_RECORDING_TOKEN_SECRET", "ORGANIZER_EMAIL_EXEMPT_DOMAINS", "SLOTS_CACHE_TTL", - "CSP_POLICY" + "CSP_POLICY", + "NEXT_PUBLIC_API_V2_URL", + "NEXT_PUBLIC_WEBAPP_URL", + "NEXT_PUBLIC_WEBSITE_URL", + "BUILD_STANDALONE" ], "tasks": { "@calcom/prisma#build": {