File tree Expand file tree Collapse file tree
start-plugin-core/tests/start-manifest-plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -238,12 +238,14 @@ export function attachRouterServerSsrUtils({
238238 const matches = matchesToDehydrate . map ( dehydrateMatch )
239239
240240 let manifestToDehydrate : Manifest | undefined = undefined
241- // For currently matched routes, send full manifest (preloads + assets)
242- // For all other routes, only send assets (no preloads as they are handled via dynamic imports)
241+ // For currently matched routes, send full manifest (preloads + assets).
242+ // For unmatched routes, include assets only when includeUnmatchedRouteAssets
243+ // is true; otherwise omit them entirely. Preloads for unmatched routes are
244+ // still excluded because they are handled via dynamic imports.
243245 if ( manifest ) {
244246 // Prod-only caching; in dev manifests may be replaced/updated (HMR)
245247 const currentRouteIdsList = matchesToDehydrate . map ( ( m ) => m . routeId )
246- const manifestCacheKey = currentRouteIdsList . join ( '\0' )
248+ const manifestCacheKey = ` ${ currentRouteIdsList . join ( '\0' ) } \0includeUnmatchedRouteAssets= ${ includeUnmatchedRouteAssets } `
247249
248250 let filteredRoutes : FilteredRoutes | undefined
249251
Original file line number Diff line number Diff line change 1- import { deserialize } from 'seroval'
21import { describe , expect , test } from 'vitest'
2+ import { deserialize } from 'seroval'
33import {
44 appendUniqueAssets ,
55 appendUniqueStrings ,
You can’t perform that action at this time.
0 commit comments