astro/.changeset/strong-years-travel.md
Emanuele Stoppa 9e5fafa2b2
feat: vercel edge middleware support (#7532)
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-07-05 16:45:58 +01:00

20 lines
432 B
Markdown

---
'astro': minor
---
Introduced a new build option for SSR, called `build.excludeMiddleware`.
```js
// astro.config.mjs
import {defineConfig} from "astro/config";
export default defineConfig({
build: {
excludeMiddleware: true
}
})
```
When enabled, the code that belongs to be middleware **won't** be imported
by the final pages/entry points. The user is responsible for importing it and
calling it manually.