From d7ac2b074a65b9cb9b8ecdfb9b15e8ac2835d783 Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Fri, 28 Jul 2023 14:09:59 +0200 Subject: [PATCH] Tweak adapter config CHANGELOG (#7853) --- .changeset/fair-emus-divide.md | 32 ++++++++++++++--------------- .changeset/tricky-candles-suffer.md | 32 ++++++++++++++--------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.changeset/fair-emus-divide.md b/.changeset/fair-emus-divide.md index e8d40120b..529760241 100644 --- a/.changeset/fair-emus-divide.md +++ b/.changeset/fair-emus-divide.md @@ -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 -+ }) -}) + }), +}); ``` diff --git a/.changeset/tricky-candles-suffer.md b/.changeset/tricky-candles-suffer.md index e1f04f193..3786399a6 100644 --- a/.changeset/tricky-candles-suffer.md +++ b/.changeset/tricky-candles-suffer.md @@ -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 -+ }) -}) + }), +}); ```