Merge pull request #6 from Jeff-Emmett/new-website
Fix Vercel deployment to serve React client instead of server code
This commit is contained in:
commit
a44ecf888a
|
|
@ -4,6 +4,7 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
"vercel-build": "vite build",
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
22
vercel.json
22
vercel.json
|
|
@ -1,26 +1,24 @@
|
||||||
{
|
{
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"buildCommand": "cd client && npm install && npm run build",
|
"buildCommand": "npm run build",
|
||||||
"outputDirectory": "client/dist",
|
"outputDirectory": "client/dist",
|
||||||
"builds": [
|
"functions": {
|
||||||
{
|
"server/index.ts": {
|
||||||
"src": "server/index.ts",
|
"maxDuration": 30
|
||||||
"use": "@vercel/node"
|
|
||||||
}
|
}
|
||||||
],
|
},
|
||||||
"routes": [
|
"routes": [
|
||||||
{
|
{
|
||||||
"src": "/api/(.*)",
|
"src": "/api/(.*)",
|
||||||
"dest": "/server/index.ts"
|
"dest": "/server/index.ts"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"src": "/assets/(.*)",
|
||||||
|
"dest": "/assets/$1"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"src": "/(.*)",
|
"src": "/(.*)",
|
||||||
"dest": "/index.html"
|
"dest": "/index.html"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"functions": {
|
|
||||||
"server/index.ts": {
|
|
||||||
"maxDuration": 30
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue