diff options
author | 2023-04-12 14:21:59 -0400 | |
---|---|---|
committer | 2023-04-12 14:21:59 -0400 | |
commit | c1e8f42a2085d9f6a1918933299a502e42a9c605 (patch) | |
tree | 5c47ef71d5587147dca3988623f2410f35a694d3 | |
parent | 5f0efe54903b1433b34964f812ec73611407fbfd (diff) | |
download | astro-c1e8f42a2085d9f6a1918933299a502e42a9c605.tar.gz astro-c1e8f42a2085d9f6a1918933299a502e42a9c605.tar.zst astro-c1e8f42a2085d9f6a1918933299a502e42a9c605.zip |
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
-rw-r--r-- | packages/integrations/vercel/README.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/integrations/vercel/README.md b/packages/integrations/vercel/README.md index 97857dc60..d9df152f8 100644 --- a/packages/integrations/vercel/README.md +++ b/packages/integrations/vercel/README.md @@ -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. +:::caution[Trying to rewrite?] Currently rewriting a request with middleware only works for static files. ::: + ## 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`. |