For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /configure/app/server/rsc.md.

server.rsc

  • Type: boolean
  • Default: false

Enable React Server Components (RSC) configuration.

When set to true, enables React Server Components support in Modern.js. This allows components to be rendered on the server, providing better performance and developer experience.

modern.config.ts
export default defineConfig({
  server: {
    rsc: true,
  },
});
Prerequisites

Before enabling RSC, ensure:

  1. React and React DOM are upgraded to version 19 (recommended 19.2.4 or above)
  2. Install the react-server-dom-rspack@0.0.2 dependency

For more information about using RSC, see the React Server Components guide.