Skip to content

Commit 284992a

Browse files
committed
chore: update configuration for Vercel deployment
- Added postinstall script to rebuild lightningcss for Vercel environment. - Updated vercel.json to include installCommand, nodeVersion, environment variables, and function runtime settings.
1 parent e3f9e05 commit 284992a

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"format": "prettier --write .",
1212
"format:check": "prettier --check .",
1313
"lint:fix": "eslint --fix .",
14-
"prepare": "[ -z \"$CI\" ] && [ -z \"$VERCEL\" ] && husky || true"
14+
"prepare": "[ -z \"$CI\" ] && [ -z \"$VERCEL\" ] && husky || true",
15+
"postinstall": "[ \"$VERCEL\" = \"1\" ] && npm rebuild lightningcss || true"
1516
},
1617
"lint-staged": {
1718
"*.{js,jsx,ts,tsx}": [

vercel.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
{
22
"$schema": "https://openapi.vercel.sh/vercel.json",
33
"buildCommand": "npm run build",
4-
"framework": "nextjs"
4+
"installCommand": "npm install && npm rebuild lightningcss",
5+
"framework": "nextjs",
6+
"nodeVersion": "24.x",
7+
"env": {
8+
"npm_config_platform": "linux",
9+
"npm_config_arch": "x64",
10+
"npm_config_libc": "glibc"
11+
},
12+
"functions": {
13+
"**/*.js": {
14+
"runtime": "nodejs24.x"
15+
}
16+
}
517
}

0 commit comments

Comments
 (0)