Skip to content

Conversation

hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Oct 18, 2025

Description

Currently we use globalThis.__viteRscDevServer.environment.ssr.runner to let rsc environment access ssr runner, but this assumes both rsc and ssr are runnable environments.

Nitro implements server environments with runners inside a single worker, so each runner can technically communicate, but not from Vite main process. We probably need some options to switch import.meta.viteRsc.loadModule implementation.

Okay, nitro has globalThis.__nitro_vite_envs__ https://github.com/nitrojs/nitro/blob/a0f52cc92b0b7f5dbc7dad3f1fadb4b1d8d342e0/src/runtime/internal/vite/dev-worker.mjs#L10

@hi-ogawa hi-ogawa added the trigger: preview Trigger pkg.pr.new label Oct 18, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 18, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@vitejs/plugin-react@924
npm i https://pkg.pr.new/@vitejs/plugin-react-oxc@924
npm i https://pkg.pr.new/@vitejs/plugin-rsc@924
npm i https://pkg.pr.new/@vitejs/plugin-react-swc@924

commit: a4d9c98

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

trigger: preview Trigger pkg.pr.new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Nitro Vite pluguin

1 participant