DeployEdit this page.md

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.

Add adapter entry to your react-server.config.mjs file. You can specify the name of a built-in adapter (vercel, netlify, cloudflare, aws, bun, deno, azure, azure-swa, firebase, docker, or singlefile) as a string, or use an external adapter package.

Note: When running a production build with Bun or Deno, the corresponding adapter is automatically detected and used without any configuration. You can override this with an explicit adapter setting in your config or via --adapter <name> on the CLI. Use --no-adapter to disable auto-detection.

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 }), };