Skip to content

Commit d2f8076

Browse files
authored
perf: Improve memory cache on build (calcom#23286)
* Improve memory cache on build * Improve memory cache on build
1 parent cbfb110 commit d2f8076

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

apps/web/next.config.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ const nextConfig = (phase) => {
196196
experimental: {
197197
// externalize server-side node_modules with size > 1mb, to improve dev mode performance/RAM usage
198198
optimizePackageImports: ["@calcom/ui"],
199+
webpackMemoryOptimizations: true,
200+
webpackBuildWorker: true,
199201
},
200202
productionBrowserSourceMaps: true,
201203
/* We already do type check on GH actions */
@@ -231,7 +233,15 @@ const nextConfig = (phase) => {
231233
images: {
232234
unoptimized: true,
233235
},
234-
webpack: (config, { webpack, buildId, isServer }) => {
236+
webpack: (config, { webpack, buildId, isServer, dev }) => {
237+
if (!dev) {
238+
if (config.cache) {
239+
config.cache = Object.freeze({
240+
type: "memory",
241+
});
242+
}
243+
}
244+
235245
if (isServer) {
236246
// Module not found fix @see https://github.com/boxyhq/jackson/issues/1535#issuecomment-1704381612
237247
config.plugins.push(

turbo.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,11 @@
250250
"CAL_VIDEO_RECORDING_TOKEN_SECRET",
251251
"ORGANIZER_EMAIL_EXEMPT_DOMAINS",
252252
"SLOTS_CACHE_TTL",
253-
"CSP_POLICY"
253+
"CSP_POLICY",
254+
"NEXT_PUBLIC_API_V2_URL",
255+
"NEXT_PUBLIC_WEBAPP_URL",
256+
"NEXT_PUBLIC_WEBSITE_URL",
257+
"BUILD_STANDALONE"
254258
],
255259
"tasks": {
256260
"@calcom/prisma#build": {

0 commit comments

Comments
 (0)