Tweak adapter config CHANGELOG (#7853)

This commit is contained in:
Chris Swithinbank 2023-07-28 14:09:59 +02:00 committed by Emanuele Stoppa
parent 9b4f70a629
commit dd3054d150
2 changed files with 32 additions and 32 deletions

View file

@ -3,37 +3,37 @@
'@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
import {defineConfig} from "astro/config";
import { defineConfig } from "astro/config";
import netlify from "@astrojs/netlify/functions";
export default defineConfig({
- build: {
build: {
- excludeMiddleware: true
- },
- adapter: netlify()
+ adapter: netlify({
},
adapter: netlify({
+ edgeMiddleware: true
+ })
})
}),
});
```
If your config includes the `build.split` option, replace it with `functionPerRoute` in your adapter options:
```diff
import {defineConfig} from "astro/config";
import { defineConfig } from "astro/config";
import netlify from "@astrojs/netlify/functions";
export default defineConfig({
- build: {
build: {
- split: true
- },
- adapter: netlify()
+ adapter: netlify({
},
adapter: netlify({
+ functionPerRoute: true
+ })
})
}),
});
```

View file

@ -3,37 +3,37 @@
'@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
import {defineConfig} from "astro/config";
import { defineConfig } from "astro/config";
import vercel from "@astrojs/vercel/serverless";
export default defineConfig({
- build: {
build: {
- excludeMiddleware: true
- },
- adapter: vercel()
+ adapter: vercel({
},
adapter: vercel({
+ edgeMiddleware: true
+ })
})
}),
});
```
If your config includes the `build.split` option, replace it with `functionPerRoute` in your adapter options:
```diff
import {defineConfig} from "astro/config";
import { defineConfig } from "astro/config";
import vercel from "@astrojs/vercel/serverless";
export default defineConfig({
- build: {
build: {
- split: true
- },
- adapter: vercel()
+ adapter: vercel({
},
adapter: vercel({
+ functionPerRoute: true
+ })
})
}),
});
```