perf: Improve memory cache on build (#23286)

* Improve memory cache on build

* Improve memory cache on build
This commit is contained in:
Volnei Munhoz authored and GitHub committed 2025-08-22 19:57:25 +00:00
1 parent cbfb11015e
commit d2f8076c70
2 files changed
+16 -2

No files matched your search

+11 -1
View File
@@ -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(