File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,36 @@ const nextConfig = {
1313 basePath : "/acm" ,
1414 assetPrefix : "/acm/" ,
1515
16+ // Memory optimization for cPanel build
17+ experimental : {
18+ // Reduce memory usage during build
19+ memoryBasedWorkers : false ,
20+ } ,
21+
22+ // Webpack optimization for memory
23+ webpack : ( config , { isServer } ) => {
24+ if ( ! isServer ) {
25+ // Reduce memory usage for client-side build
26+ config . optimization . splitChunks = {
27+ chunks : "all" ,
28+ cacheGroups : {
29+ default : {
30+ minChunks : 1 ,
31+ priority : - 20 ,
32+ reuseExistingChunk : true ,
33+ } ,
34+ vendor : {
35+ test : / [ \\ / ] n o d e _ m o d u l e s [ \\ / ] / ,
36+ name : "vendors" ,
37+ priority : - 10 ,
38+ chunks : "all" ,
39+ } ,
40+ } ,
41+ } ;
42+ }
43+ return config ;
44+ } ,
45+
1646 // If deploying to root:
1747 // basePath: '/',
1848 // assetPrefix: '/',
You can’t perform that action at this time.
0 commit comments