All Topics
All Topics
Technology
Technology
AI
AI
Business
Business
Entertainment
Entertainment
News
News
Programming
Programming
Security
Security
Science
Science
Design
Design
Environment
Environment
Finance
Finance
Crypto
Crypto
Politics
Politics
Sports
Sports
Education
Education
Gaming
Gaming
Art
Art
Music
Music
Health
Health
Books
Books
Food
Food
Travel
Travel
Personal
Personal
Bluesky
Twitter

Workers - Improved React Server Components support in the Cloudflare Vite plugin

4mo ago

Source

CloudflareWorkers - Improved React Server Components support in the Cloudflare Vite plugincloudflare.com
Snippet from the RSS feed
The Cloudflare Vite plugin now integrates seamlessly @vitejs/plugin-rsc , the official Vite plugin for React Server Components . A childEnvironments option has been added to the plugin config to enable using multiple environments within a single Worker. The parent environment can then import modules from a child environment in order to access a separate module graph. For a typical RSC use case, the plugin might be configured as in the following example: export default defineConfig ( { plugins : [ cloudflare ( { viteEnvironment : { name : "rsc" , childEnvironments : [ "ssr" ] , }, } ) , ] , } ) ; @vitejs/plugin-rsc provides the lower level functionality that frameworks, such as React Router , build upon. The GitHub repository includes a basic Cloudflare example .

You might also wanna read

Comments

Sign in to join the conversation.

No comments yet. Be the first.