File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
packages/react-router-dev/vite/rsc Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -516,17 +516,13 @@ export function reactRouterRSCVitePlugin(): Vite.PluginOption[] {
516516 const clientOutDir =
517517 resolvedViteConfig . environments . client ?. build ?. outDir ;
518518 invariant ( clientOutDir , "Client build directory config not found" ) ;
519- const relativeAssetsBuildDirectory = Path . relative (
520- rscOutDir ,
521- clientOutDir ,
522- ) ;
519+ const assetsBuildDirectory = Path . relative ( rscOutDir , clientOutDir ) ;
520+ const publicPath = resolvedViteConfig . base ;
523521
524- let code = "" ;
525- code += `export default {` ;
526- code += ` publicPath: ${ JSON . stringify ( resolvedViteConfig . base ?? "/" ) } ,` ;
527- code += ` assetsBuildDirectory: ${ JSON . stringify ( relativeAssetsBuildDirectory ) } ,` ;
528- code += `};` ;
529- return code ;
522+ return `export default ${ JSON . stringify ( {
523+ assetsBuildDirectory,
524+ publicPath,
525+ } ) } ;`;
530526 }
531527 } ,
532528 } ,
You can’t perform that action at this time.
0 commit comments