We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 655cb45 commit eaff91bCopy full SHA for eaff91b
packages/react-router-dev/vite/rsc/plugin.ts
@@ -505,6 +505,11 @@ export function reactRouterRSCVitePlugin(): Vite.PluginOption[] {
505
}
506
},
507
load(id) {
508
+ // react-router-serve is not used in dev mode
509
+ if (viteCommand !== "build") {
510
+ return `export default {};`;
511
+ }
512
+
513
if (id === virtual.reactRouterServeConfig.resolvedId) {
514
const rscOutDir = resolvedViteConfig.environments.rsc?.build?.outDir;
515
invariant(rscOutDir, "RSC build directory config not found");
0 commit comments