File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -393,6 +393,8 @@ export function singleFetchUrl(reqUrl: URL | string) {
393
393
394
394
if ( url . pathname === "/" ) {
395
395
url . pathname = "_root.data" ;
396
+ } else if ( url . pathname === window . __remixContext . basename ) {
397
+ url . pathname = window . __remixContext . basename . concat ( "_root.data" ) ;
396
398
} else {
397
399
url . pathname = `${ url . pathname . replace ( / \/ $ / , "" ) } .data` ;
398
400
}
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ export const createRequestHandler: CreateRequestHandlerFunction = (
195
195
let handlerUrl = new URL ( request . url ) ;
196
196
handlerUrl . pathname = handlerUrl . pathname
197
197
. replace ( / \. d a t a $ / , "" )
198
- . replace ( / ^ \/ _ r o o t $ / , "/" ) ;
198
+ . replace ( _build . basename ? / \/ _ r o o t $ / : / ^ \/ _ r o o t $ / , "/" ) ;
199
199
200
200
let singleFetchMatches = matchServerRoutes (
201
201
routes ,
You can’t perform that action at this time.
0 commit comments