perf: Improve memory cache on build (#23286)
* Improve memory cache on build * Improve memory cache on build
This commit is contained in:
+11
-1
@@ -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(
|
||||
|
||||
+5
-1
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user