File tree Expand file tree Collapse file tree 3 files changed +59
-1
lines changed
Expand file tree Collapse file tree 3 files changed +59
-1
lines changed Original file line number Diff line number Diff line change 1+ # Git and version control
12.git
3+ .github
4+
5+ # Build cache
6+ .next /cache
7+ .cache
8+
9+ # Reports and testing
210reports
3- .next /cache
11+ coverage
12+ __tests__
13+
14+ # Documentation (except README)
15+ docs /
16+ * .md
17+ ! README.md
18+
19+ # Development files
20+ .vscode
21+ .idea
22+
23+ # Logs
24+ * .log
25+ logs
26+
27+ # Temporary files
28+ tmp
29+ temp
30+
31+ # Test files
32+ * .test.ts
33+ * .test.tsx
34+ * .test.js
35+ * .test.jsx
36+ * .spec.ts
37+ * .spec.tsx
38+ * .spec.js
39+ * .spec.jsx
Original file line number Diff line number Diff line change @@ -26,6 +26,18 @@ const nextConfig = {
2626
2727 experimental : { } ,
2828
29+ // Exclude heavy dependencies from functions that don't need them
30+ outputFileTracingExcludes : {
31+ // Exclude @vercel /og from all API routes except /api/og/generate
32+ '/api/!(og)/**' : [ 'node_modules/@vercel/og/**/*' ] ,
33+ '/api/og/fetch' : [ 'node_modules/@vercel/og/**/*' ] ,
34+ } ,
35+
36+ // Include only necessary files for specific routes
37+ outputFileTracingIncludes : {
38+ '/api/og/generate' : [ ] ,
39+ } ,
40+
2941 webpack ( config , { isServer } ) {
3042 config . module . rules . push ( {
3143 test : / \. s v g $ / ,
@@ -38,6 +50,16 @@ const nextConfig = {
3850 } ;
3951 }
4052
53+ // Optimize for serverless functions
54+ if ( isServer ) {
55+ // Enable tree-shaking for server bundles
56+ config . optimization = {
57+ ...config . optimization ,
58+ usedExports : true ,
59+ sideEffects : false ,
60+ } ;
61+ }
62+
4163 return config ;
4264 } ,
4365
File renamed without changes.
You can’t perform that action at this time.
0 commit comments