Skip to content

Commit 84008da

Browse files
committed
Ensure build manifest is always loaded in dev
1 parent 95781a3 commit 84008da

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/react-router-dev/vite/plugin.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,9 +1116,11 @@ export const reactRouterVitePlugin: ReactRouterVitePlugin = () => {
11161116
});
11171117

11181118
await updatePluginContext();
1119-
buildManifest = ctx.reactRouterConfig.future.unstable_viteEnvironmentApi
1120-
? await getBuildManifest(ctx)
1121-
: ctx.environmentBuildContext?.buildManifest;
1119+
buildManifest =
1120+
ctx.reactRouterConfig.future.unstable_viteEnvironmentApi ||
1121+
viteCommand === "serve"
1122+
? await getBuildManifest(ctx)
1123+
: ctx.environmentBuildContext?.buildManifest;
11221124
invariant(buildManifest);
11231125

11241126
Object.assign(

0 commit comments

Comments
 (0)