Tweak adapter config CHANGELOG (#7853)
This commit is contained in:
parent
ec273342e5
commit
d7ac2b074a
2 changed files with 32 additions and 32 deletions
|
@ -3,37 +3,37 @@
|
||||||
'@astrojs/netlify': minor
|
'@astrojs/netlify': minor
|
||||||
---
|
---
|
||||||
|
|
||||||
The configuration `build.split` and `build.excludeMiddleware` are deprecated.
|
The `build.split` and `build.excludeMiddleware` configuration options are deprecated and have been replaced by options in the adapter config.
|
||||||
|
|
||||||
Configuration that were inside the astro configuration, are now moved inside the adapter:
|
If your config includes the `build.excludeMiddleware` option, replace it with `edgeMiddleware` in your adapter options:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
import {defineConfig} from "astro/config";
|
import { defineConfig } from "astro/config";
|
||||||
import netlify from "@astrojs/netlify/functions";
|
import netlify from "@astrojs/netlify/functions";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
- build: {
|
build: {
|
||||||
- excludeMiddleware: true
|
- excludeMiddleware: true
|
||||||
- },
|
},
|
||||||
- adapter: netlify()
|
adapter: netlify({
|
||||||
+ adapter: netlify({
|
|
||||||
+ edgeMiddleware: true
|
+ edgeMiddleware: true
|
||||||
+ })
|
}),
|
||||||
})
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If your config includes the `build.split` option, replace it with `functionPerRoute` in your adapter options:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
import {defineConfig} from "astro/config";
|
import { defineConfig } from "astro/config";
|
||||||
import netlify from "@astrojs/netlify/functions";
|
import netlify from "@astrojs/netlify/functions";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
- build: {
|
build: {
|
||||||
- split: true
|
- split: true
|
||||||
- },
|
},
|
||||||
- adapter: netlify()
|
adapter: netlify({
|
||||||
+ adapter: netlify({
|
|
||||||
+ functionPerRoute: true
|
+ functionPerRoute: true
|
||||||
+ })
|
}),
|
||||||
})
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -3,37 +3,37 @@
|
||||||
'@astrojs/vercel': minor
|
'@astrojs/vercel': minor
|
||||||
---
|
---
|
||||||
|
|
||||||
The configuration `build.split` and `build.excludeMiddleware` are deprecated.
|
The `build.split` and `build.excludeMiddleware` configuration options are deprecated and have been replaced by options in the adapter config.
|
||||||
|
|
||||||
Configuration that were inside the astro configuration, are now moved inside the adapter:
|
If your config includes the `build.excludeMiddleware` option, replace it with `edgeMiddleware` in your adapter options:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
import {defineConfig} from "astro/config";
|
import { defineConfig } from "astro/config";
|
||||||
import vercel from "@astrojs/vercel/serverless";
|
import vercel from "@astrojs/vercel/serverless";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
- build: {
|
build: {
|
||||||
- excludeMiddleware: true
|
- excludeMiddleware: true
|
||||||
- },
|
},
|
||||||
- adapter: vercel()
|
adapter: vercel({
|
||||||
+ adapter: vercel({
|
|
||||||
+ edgeMiddleware: true
|
+ edgeMiddleware: true
|
||||||
+ })
|
}),
|
||||||
})
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If your config includes the `build.split` option, replace it with `functionPerRoute` in your adapter options:
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
import {defineConfig} from "astro/config";
|
import { defineConfig } from "astro/config";
|
||||||
import vercel from "@astrojs/vercel/serverless";
|
import vercel from "@astrojs/vercel/serverless";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
- build: {
|
build: {
|
||||||
- split: true
|
- split: true
|
||||||
- },
|
},
|
||||||
- adapter: vercel()
|
adapter: vercel({
|
||||||
+ adapter: vercel({
|
|
||||||
+ functionPerRoute: true
|
+ functionPerRoute: true
|
||||||
+ })
|
}),
|
||||||
})
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue