Added a caution about rewrites only working for static files (#6517)
Currently using rewrite with static files works but server rendered files with either edge or serverless function don't get rewritten. See: https://github.com/withastro/astro/issues/6446
This commit is contained in:
parent
5f0efe5490
commit
c1e8f42a20
1 changed files with 2 additions and 0 deletions
|
@ -175,6 +175,8 @@ You can use Vercel middleware to intercept a request and redirect before sending
|
||||||
```
|
```
|
||||||
1. While developing locally, you can run `vercel dev` to run middleware. In production, Vercel will handle this for you.
|
1. While developing locally, you can run `vercel dev` to run middleware. In production, Vercel will handle this for you.
|
||||||
|
|
||||||
|
:::caution[Trying to rewrite?] Currently rewriting a request with middleware only works for static files. :::
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
**A few known complex packages (example: [puppeteer](https://github.com/puppeteer/puppeteer)) do not support bundling and therefore will not work properly with this adapter.** By default, Vercel doesn't include npm installed files & packages from your project's `./node_modules` folder. To address this, the `@astrojs/vercel` adapter automatically bundles your final build output using `esbuild`.
|
**A few known complex packages (example: [puppeteer](https://github.com/puppeteer/puppeteer)) do not support bundling and therefore will not work properly with this adapter.** By default, Vercel doesn't include npm installed files & packages from your project's `./node_modules` folder. To address this, the `@astrojs/vercel` adapter automatically bundles your final build output using `esbuild`.
|
||||||
|
|
Loading…
Reference in a new issue