-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Closed
Labels
Description
Describe the bug
I am using the new Environment API with multiple environments: client, ssr, rsc
I have different root configuration for the ssr and rsc environments
On file change, HMR payload is incorrect for the environments where the root is different than the main Vite config's root
Reproduction
https://stackblitz.com/edit/vitejs-vite-krepgb?file=server.js,folder-a%2Ffile-a.js&terminal=dev
Steps to reproduce
Start Vite dev server by running pnpm dev
Change the content of ./folder-a/file-a.js which is imported by ./folder-b/file-b.js which is imported by a ModuleRunner using the RSC environment's transport.
Check that HMR payload is incorrect, triggeredBy path is /home/projects/vitejs-vite-krepgb/folder-b/file-a.js, which doesn't exist, folder is incorrect.
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.20.3 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
vite: 6.0.0-alpha.18 => 6.0.0-alpha.18Used 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. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- 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.