Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split support in the Vercel Serverless adapter #7514

Merged
merged 6 commits into from
Jun 29, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Better changeset
  • Loading branch information
matthewp committed Jun 29, 2023
commit 7c5869338635c51071f7ebeb9b1aa472af7dd51b
18 changes: 17 additions & 1 deletion .changeset/tricky-snails-poke.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,20 @@
'@astrojs/vercel': minor
---

Split support in Serverless
Split support in Vercel Serverless

The Vercel adapter builds to a single function by default. Astro 2.7 added support for splitting your build into separate entry points per page. If you use this configuration the Vercel adapter will generate a separate function for each page. This can help reduce the size of each function so they are only bundling code used on that page.

```js
// astro.config.mjs
import { defineConfig } from 'astro/config';
import vercel from '@astrojs/vercel/serverless';

export default defineConfig({
output: 'server',
adapter: vercel(),
build: {
split: true
}
});
```
Loading