Skip to content

Commit e284f48

Browse files
committed
fix: vercel build
1 parent 02931df commit e284f48

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

apps/desktop/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"test": "vitest run",
1414
"test:dev": "vitest --ui",
1515
"delete": "rimraf node_modules",
16-
"postinstall": "patch-package"
16+
"postinstall": "node scripts/postinstall.js"
1717
},
1818
"dependencies": {
1919
"@ai-sdk/deepseek": "^1.0.28",
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { execSync } from 'child_process'
2+
3+
if (process.env.VERCEL) {
4+
console.log('Skipping patch-package on Vercel')
5+
process.exit(0)
6+
}
7+
8+
try {
9+
execSync('patch-package', { stdio: 'inherit' })
10+
} catch (error) {
11+
process.exit(1)
12+
}

apps/web/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"analyze": "ANALYZE=true yarn build",
88
"dev": "next dev --turbopack -p 3100",
99
"prebuild": "rimraf .next",
10-
"build:prod": "NODE_ENV=production next build --turbopack",
10+
"build": "yarn workspace @markflowy/i18n build && yarn workspace @markflowy/interface build && next build --turbopack",
11+
"build:prod": "NODE_ENV=production yarn build",
12+
"build:vercel": "yarn workspace @markflowy/types build && yarn workspace @markflowy/theme build && yarn workspace @markflowy/i18n build && yarn workspace @markflowy/interface build && NODE_ENV=production next build --turbopack",
1113
"start": "NODE_ENV=production next start",
1214
"prettier": "prettier --write \"**/*.*\""
1315
},

0 commit comments

Comments
 (0)