I'm new to Vercel, and not sure if what I seek to do can indeed be done....
I have a Typescript npm monorepo that contains packages for a TS React SPA packaged by Vite, some Vercel serverless functions, as well as packages for shared types and configuration, and some more that are not relevant.
Is it possible for a Vercel project to run an npm build command for the whole project whilst specifying different locations for the React app and the SF package?
My project works locally with vercel dev, but I can't see how to integrate that with the Project Dashboard:
{ "version": 2,
"build": { "env": { "NODE_ENV": "production", "VITE_HTTP_PORT": 3000, "VITE_ENDPOINT_SEARCH": "/api/search", "VITE_ENDPOINT_DETAILS": "/api/details", "DATABASE_URL": "postgres://username:password@localhost:1234/dbname" }, "commands": { "build": "cd packages/client && npm run build" } },
"builds": [ { "src": "packages/client/dist/**/*", "use": "@vercel/static" },
{ "src": "packages/vercel/build/**/*", "use": "@vercel/node" } ], "routes": [ { "src": "/api/search", "dest": "packages/vercel/build/search.js" },
{ "src": "/api/hello", "dest": "packages/vercel/build/hello.js" },
{ "src": "/(.*)", "dest": "packages/client/dist/$1" } ]}