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.
-
@lazarv/react-server-adapter-vercel
for Vercel deployment
-
@lazarv/react-server-adapter-netlify
for Netlify deployment -
@lazarv/react-server-adapter-cloudflare-pages
for Cloudflare Pages deployment -
@lazarv/react-server-adapter-cloudflare-workers
for Cloudflare Workers deployment -
@lazarv/react-server-adapter-sst
for Serverless Stack deployment
Add adapter
entry to your react-server.config.mjs
file. You can specify the name of the adapter as a string. The adapter package will be resolved from your project's dependencies.
export default {
adapter: '@lazarv/react-server-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: [
'@lazarv/react-server-adapter-vercel',
{
// Custom options
},
],
};
You can also import an adapter from a package or file.
import adapter from '@lazarv/react-server-adapter-vercel';
export default {
adapter: adapter({
// Custom options
}),
};