Skip to content

Commit

Permalink
ci: update integration docs (#4400)
Browse files Browse the repository at this point in the history
Co-authored-by: delucis <[email protected]>
Co-authored-by: Yan Thomas <[email protected]>
  • Loading branch information
3 people authored Aug 30, 2023
1 parent 8153981 commit 8f2b8fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/integrations-guide/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ import ReactComponent from './ReactComponent';
</ReactComponent>
```

If you are using a library that *expects* more than one child element element to be passed, for example so that it can slot certain elements in different places, you might find this to be a blocker.
If you are using a library that *expects* more than one child element to be passed, for example so that it can slot certain elements in different places, you might find this to be a blocker.

You can set the experimental flag `experimentalReactChildren` to tell Astro to always pass children to React as React vnodes. There is some runtime cost to this, but it can help with compatibility.

Expand Down
8 changes: 5 additions & 3 deletions src/content/docs/en/guides/integrations-guide/vercel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,11 @@ export default defineConfig({
});
```

### Per-page functions
### Function bundling configuration

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.
The Vercel adapter splits builds into a separate function per route by default. This helps reduce the size of each function, as it only bundles code used on that page.

You can disable this and build to a single function by setting the `functionPerRoute` configuration option to `false`:

```js
// astro.config.mjs
Expand All @@ -235,7 +237,7 @@ import vercel from '@astrojs/vercel/serverless';
export default defineConfig({
output: 'server',
adapter: vercel({
functionPerRoute: true,
functionPerRoute: false,
}),
});
```
Expand Down

0 comments on commit 8f2b8fe

Please sign in to comment.