-
-
Notifications
You must be signed in to change notification settings - Fork 237
Labels
Description
Related plugins
Describe the bug
The plugin resolves framework dependencies from the process.cwd() instead of checking the config.root: https://vite.dev/config/shared-options#root
The potential fix would be to change the following line to config.root ?? process.cwd()
| root: process.cwd(), |
Reproduction
https://github.com/vixalien/repro-react-router-rsc-runner
Steps to reproduce
- Create an RSC app with the command:
npx create-react-router@latest --template remix-run/react-router-templates/unstable_rsc-framework-mode - In another folder/package create a simple JS file that uses the Vite JS API to run the RSC app by pointing vite to the previous directory
import { createServer } from "vite";
const server = await createServer({
root: "../app",
});
await server.listen();
server.printUrls();
server.bindCLIShortcuts({ print: true }); System Info
System:
OS: Linux 6.18 GNOME OS Nightly
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Memory: 19.50 GB / 30.64 GB
Container: Yes
Shell: 5.3.9 - /bin/bash
Binaries:
Node: 25.6.1 - /home/alien/.local/share/mise/installs/node/25.6.1/bin/node
Yarn: 4.12.0 - /home/alien/.local/share/mise/installs/yarn/4.12.0/bin/yarn
npm: 11.9.0 - /home/alien/.local/share/mise/installs/node/25.6.1/bin/npm
pnpm: 10.30.1 - /home/alien/.local/share/mise/installs/pnpm/10.30.1/pnpm
Deno: 2.6.10 - /home/alien/.local/share/mise/installs/deno/2.6.10/bin/denoUsed Package Manager
pnpm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable