Adapters
You can use adapters to configure your app for different deployment environments. This is a list of available adapters and how to configure them.
- Vercel
- Netlify
- Cloudflare Workers/Pages
- Bun
- Deno
Add adapter entry to your react-server.config.mjs file. You can specify the name of a built-in adapter (vercel, netlify, cloudflare, bun, or deno) as a string, or use an external adapter package.
export default {
adapter: 'vercel',
};
You can also specify custom options for all adapters. Configuration options are different for each adapter. Check the page of the adapter for details.
export default {
adapter: [
'vercel',
{
// Custom options
},
],
};
You can also import an adapter from a package or file.
import adapter from '@lazarv/react-server/adapters/vercel';
export default {
adapter: adapter({
// Custom options
}),
};