Skip to content

Commit f437145

Browse files
committed
fix: update Node.js version for Vercel compatibility
- Change engines.node from '20.x' to '>=20.0.0' - Add .nvmrc with Node 20 - Add vercel.json for build configuration
1 parent 3e461f5 commit f437145

File tree

3 files changed

+3
-53
lines changed

3 files changed

+3
-53
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22
1+
20

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"education"
103103
],
104104
"engines": {
105-
"node": "20.x"
105+
"node": ">=20.0.0"
106106
},
107107
"overrides": {
108108
"diff": "^8.0.3",

vercel.json

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,6 @@
11
{
2-
"$schema": "https://openapi.vercel.sh/vercel.json",
32
"buildCommand": "npm run build",
43
"outputDirectory": "dist",
5-
"devCommand": "npm run dev",
6-
"installCommand": "npm install",
74
"framework": "vite",
8-
"regions": ["iad1"],
9-
"functions": {
10-
"api/translate.ts": {
11-
"runtime": "@vercel/node@3.0.0"
12-
}
13-
},
14-
"rewrites": [
15-
{
16-
"source": "/api/translate",
17-
"destination": "/api/translate"
18-
},
19-
{
20-
"source": "/(.*)",
21-
"destination": "/index.html"
22-
}
23-
],
24-
"headers": [
25-
{
26-
"source": "/(.*)",
27-
"headers": [
28-
{
29-
"key": "X-Content-Type-Options",
30-
"value": "nosniff"
31-
},
32-
{
33-
"key": "X-Frame-Options",
34-
"value": "DENY"
35-
},
36-
{
37-
"key": "X-XSS-Protection",
38-
"value": "1; mode=block"
39-
},
40-
{
41-
"key": "Referrer-Policy",
42-
"value": "strict-origin-when-cross-origin"
43-
}
44-
]
45-
},
46-
{
47-
"source": "/assets/(.*)",
48-
"headers": [
49-
{
50-
"key": "Cache-Control",
51-
"value": "public, max-age=31536000, immutable"
52-
}
53-
]
54-
}
55-
]
5+
"installCommand": "npm install"
566
}

0 commit comments

Comments
 (0)