File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
packages/react-router-dev/vite Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @react-router/dev " : patch
3
+ ---
4
+
5
+ Fix support for custom client ` build.rollupOptions.output.entryFileNames `
Original file line number Diff line number Diff line change @@ -3308,8 +3308,11 @@ export async function getEnvironmentOptionsResolvers(
3308
3308
}
3309
3309
) ,
3310
3310
] ,
3311
- output : {
3312
- entryFileNames ( { moduleIds } ) {
3311
+ output : ( ctx . reactRouterConfig . future . unstable_viteEnvironmentApi
3312
+ ? viteUserConfig ?. environments ?. client ?. build ?. rollupOptions
3313
+ ?. output
3314
+ : viteUserConfig ?. build ?. rollupOptions ?. output ) ?? {
3315
+ entryFileNames : ( { moduleIds } ) => {
3313
3316
let routeChunkModuleId = moduleIds . find ( isRouteChunkModuleId ) ;
3314
3317
let routeChunkName = routeChunkModuleId
3315
3318
? getRouteChunkNameFromModuleId ( routeChunkModuleId )
@@ -3318,7 +3321,9 @@ export async function getEnvironmentOptionsResolvers(
3318
3321
? `-${ kebabCase ( routeChunkName ) } `
3319
3322
: "" ;
3320
3323
return path . posix . join (
3321
- viteUserConfig . build ?. assetsDir ?? "assets" ,
3324
+ ( ctx . reactRouterConfig . future . unstable_viteEnvironmentApi
3325
+ ? viteUserConfig ?. environments ?. client ?. build ?. assetsDir
3326
+ : viteUserConfig ?. build ?. assetsDir ) ?? "assets" ,
3322
3327
`[name]${ routeChunkSuffix } -[hash].js`
3323
3328
) ;
3324
3329
} ,
You can’t perform that action at this time.
0 commit comments