The Problem
pnpm dev (concurrent backend/frontend) works but lacks production parity. vercel dev currently fails to emulate the Vercel environment correctly, causing a gap between local development and production.
Specific Issues
- Routing:
/api/* requests are not being proxied to the /api directory serverless functions.
- Initialization: Python functions fail to boot within the Vercel local emulator.
- Proxy Conflict: Collision between Vite’s dev server port and Vercel’s proxy port.
- Env Injection: Environment variables from
.env are not consistently passed to the Python runtime under vercel dev.
Goal
Achieve 1:1 parity between local development and production deployment.
The Problem
pnpm dev(concurrent backend/frontend) works but lacks production parity.vercel devcurrently fails to emulate the Vercel environment correctly, causing a gap between local development and production.Specific Issues
/api/*requests are not being proxied to the/apidirectory serverless functions..envare not consistently passed to the Python runtime undervercel dev.Goal
Achieve 1:1 parity between local development and production deployment.