Skip to content

Commit

Permalink
Refactor getServerBundleRouteIds
Browse files Browse the repository at this point in the history
  • Loading branch information
markdalgleish committed Feb 26, 2025
1 parent 919c468 commit 7fea63d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/react-router-dev/vite/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,15 +524,15 @@ let getServerBundleRouteIds = (
vitePluginContext: Vite.Rollup.PluginContext,
ctx: ReactRouterPluginContext
): string[] | undefined => {
if (!ctx.buildManifest) {
return undefined;
}

let environmentName = ctx.reactRouterConfig.future.unstable_viteEnvironmentApi
? vitePluginContext.environment.name
: ctx.environmentBuildContext?.name;

if (
!ctx.buildManifest ||
!environmentName ||
!isSsrBundleEnvironmentName(environmentName)
) {
if (!environmentName || !isSsrBundleEnvironmentName(environmentName)) {
return undefined;
}

Expand Down

0 comments on commit 7fea63d

Please sign in to comment.