Reproduction
Link to reproduction:
https://stackblitz.com/edit/github-ygcrztk9
Steps to reproduce:
- Run
react-router build
- Observe the build failure:
ENOENT: no such file or directory, open '/home/projects/github-ygcrztk9/dist/.vite/manifest.json'
System Info
System:
OS: macOS 26.3.1
CPU: (8) arm64 Apple M1 Pro
Memory: 133.17 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.14.0 - /Users/paveldubovitsky/.local/share/mise/installs/node/24.14.0/bin/node
npm: 11.9.0 - /Users/paveldubovitsky/.local/share/mise/installs/node/24.14.0/bin/npm
pnpm: 10.30.3 - /Users/paveldubovitsky/.local/share/mise/installs/pnpm/10.30.3/pnpm
bun: 1.3.5 - /Users/paveldubovitsky/.local/share/mise/installs/bun/1.3.5/bin/bun
Browsers:
Chrome: 146.0.7680.165
Safari: 26.3.1
npmPackages:
@react-router/dev: 7.13.1 => 7.13.1
@react-router/node: 7.13.1 => 7.13.1
@react-router/serve: 7.13.1 => 7.13.1
react-router: 7.13.1 => 7.13.1
vite: ^7.1.7 => 7.3.1
Used Package Manager
npm
Expected Behavior
React Router build hooks should only run for actual React Router server environments.
Actual Behavior
React Router build hooks also run for external server environments introduced by other Vite plugins (Nitro in this case).
Reproduction
Link to reproduction:
https://stackblitz.com/edit/github-ygcrztk9
Steps to reproduce:
react-router buildENOENT: no such file or directory, open '/home/projects/github-ygcrztk9/dist/.vite/manifest.json'System Info
System: OS: macOS 26.3.1 CPU: (8) arm64 Apple M1 Pro Memory: 133.17 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 24.14.0 - /Users/paveldubovitsky/.local/share/mise/installs/node/24.14.0/bin/node npm: 11.9.0 - /Users/paveldubovitsky/.local/share/mise/installs/node/24.14.0/bin/npm pnpm: 10.30.3 - /Users/paveldubovitsky/.local/share/mise/installs/pnpm/10.30.3/pnpm bun: 1.3.5 - /Users/paveldubovitsky/.local/share/mise/installs/bun/1.3.5/bin/bun Browsers: Chrome: 146.0.7680.165 Safari: 26.3.1 npmPackages: @react-router/dev: 7.13.1 => 7.13.1 @react-router/node: 7.13.1 => 7.13.1 @react-router/serve: 7.13.1 => 7.13.1 react-router: 7.13.1 => 7.13.1 vite: ^7.1.7 => 7.3.1Used Package Manager
npm
Expected Behavior
React Router build hooks should only run for actual React Router server environments.
Actual Behavior
React Router build hooks also run for external server environments introduced by other Vite plugins (Nitro in this case).