magne4000 / vite-plugin-vercel

Vercel adapter for vite
https://test-vite-vercel-plugin.vercel.app
97 stars 14 forks source link

Doesn't respect vercel.json #97

Open nitedani opened 2 months ago

nitedani commented 2 months ago

When using vite-plugin-vercel without vike integration, I expect the following:

Having this vercel.json:

{
  "outputDirectory": "dist/client",
  "rewrites": [
    {
      "source": "/((?!assets/).*)",
      "destination": "/api"
    }
  ]
}

Then calling vercel build

vercel build 
> runs vite build 
> vite-plugin-vercel bundles _api/* to .vercel/output/functions
> vercel build copies outputDirectory to .vercel/output
> vercel build adds the rewrite to .vercel/output/config.json

Instead this happens:

vercel build 
> runs vite build 
> vite-plugin-vercel bundles _api/* to .vercel/output/functions
outputDirectory is not in .vercel/output
the rewrite is not added
magne4000 commented 2 months ago

I'm not having the same behavior. Could you provide a minimal reproduction?