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