Skip to content

Commit d26872d

Browse files
author
Gerome El-assaad
committed
Add webpack optimization for large JSON files cache
1 parent 646b228 commit d26872d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

next.config.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
const nextConfig = {
33
eslint: {
44
ignoreDuringBuilds: true
5+
},
6+
webpack: (config, { dev }) => {
7+
// Optimize caching for large JSON files
8+
if (!dev) {
9+
config.cache = {
10+
...config.cache,
11+
maxMemoryGenerations: 1,
12+
};
13+
}
14+
return config;
515
}
616
}
717

0 commit comments

Comments
 (0)