astro/.changeset/fair-emus-divide.md

40 lines
937 B
Markdown
Raw Normal View History

---
'astro': major
'@astrojs/netlify': minor
---
2023-07-28 12:09:59 +00:00
The `build.split` and `build.excludeMiddleware` configuration options are deprecated and have been replaced by options in the adapter config.
2023-07-28 12:09:59 +00:00
If your config includes the `build.excludeMiddleware` option, replace it with `edgeMiddleware` in your adapter options:
```diff
2023-07-28 12:09:59 +00:00
import { defineConfig } from "astro/config";
import netlify from "@astrojs/netlify/functions";
export default defineConfig({
2023-07-28 12:09:59 +00:00
build: {
- excludeMiddleware: true
2023-07-28 12:09:59 +00:00
},
adapter: netlify({
+ edgeMiddleware: true
2023-07-28 12:09:59 +00:00
}),
});
```
2023-07-28 12:09:59 +00:00
If your config includes the `build.split` option, replace it with `functionPerRoute` in your adapter options:
```diff
2023-07-28 12:09:59 +00:00
import { defineConfig } from "astro/config";
import netlify from "@astrojs/netlify/functions";
export default defineConfig({
2023-07-28 12:09:59 +00:00
build: {
- split: true
2023-07-28 12:09:59 +00:00
},
adapter: netlify({
+ functionPerRoute: true
2023-07-28 12:09:59 +00:00
}),
});
```