Skip to content

Commit

Permalink
Tweak adapter config CHANGELOG (#7853)
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis authored Jul 28, 2023
1 parent 3c25e5e commit 93e35d8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
32 changes: 16 additions & 16 deletions .changeset/fair-emus-divide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
+ })
})
}),
});
```

32 changes: 16 additions & 16 deletions .changeset/tricky-candles-suffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
+ })
})
}),
});
```

0 comments on commit 93e35d8

Please sign in to comment.