@@ -474,7 +474,7 @@ export async function resolveEntryFiles({
474
474
rootDirectory : string ;
475
475
reactRouterConfig : ResolvedVitePluginConfig ;
476
476
} ) {
477
- let { appDirectory, future } = reactRouterConfig ;
477
+ let { appDirectory } = reactRouterConfig ;
478
478
479
479
let defaultsDirectory = path . resolve ( __dirname , "config" , "defaults" ) ;
480
480
@@ -500,23 +500,9 @@ export async function resolveEntryFiles({
500
500
} else if ( userEntryServerFile ) {
501
501
entryServerFile = userEntryServerFile ;
502
502
} else {
503
- let serverRuntime = deps [ "@react-router/deno" ]
504
- ? "deno"
505
- : deps [ "@react-router/cloudflare" ]
506
- ? "cloudflare"
507
- : deps [ "@react-router/node" ]
508
- ? "node"
509
- : undefined ;
510
-
511
- if ( ! serverRuntime ) {
512
- let serverRuntimes = [
513
- "@react-router/deno" ,
514
- "@react-router/cloudflare" ,
515
- "@react-router/node" ,
516
- ] ;
517
- let formattedList = disjunctionListFormat . format ( serverRuntimes ) ;
503
+ if ( ! deps [ "@react-router/node" ] ) {
518
504
throw new Error (
519
- `Could not determine server runtime. Please install one of the following: ${ formattedList } `
505
+ `Could not determine server runtime. Please install @react-router/node, or provide a custom entry.server.tsx/jsx file in your app directory. `
520
506
) ;
521
507
}
522
508
@@ -542,7 +528,7 @@ export async function resolveEntryFiles({
542
528
} ) ;
543
529
}
544
530
545
- entryServerFile = `entry.server.${ serverRuntime } .tsx` ;
531
+ entryServerFile = `entry.server.node .tsx` ;
546
532
}
547
533
548
534
let entryClientFilePath = userEntryClientFile
@@ -566,35 +552,3 @@ function findEntry(dir: string, basename: string): string | undefined {
566
552
567
553
return undefined ;
568
554
}
569
-
570
- // adds types for `Intl.ListFormat` to the global namespace
571
- // we could also update our `tsconfig.json` to include `lib: ["es2021"]`
572
- declare namespace Intl {
573
- type ListType = "conjunction" | "disjunction" ;
574
-
575
- interface ListFormatOptions {
576
- localeMatcher ?: "lookup" | "best fit" ;
577
- type ?: ListType ;
578
- style ?: "long" | "short" | "narrow" ;
579
- }
580
-
581
- interface ListFormatPart {
582
- type : "element" | "literal" ;
583
- value : string ;
584
- }
585
-
586
- class ListFormat {
587
- constructor ( locales ?: string | string [ ] , options ?: ListFormatOptions ) ;
588
- format ( values : any [ ] ) : string ;
589
- formatToParts ( values : any [ ] ) : ListFormatPart [ ] ;
590
- supportedLocalesOf (
591
- locales : string | string [ ] ,
592
- options ?: ListFormatOptions
593
- ) : string [ ] ;
594
- }
595
- }
596
-
597
- let disjunctionListFormat = new Intl . ListFormat ( "en" , {
598
- style : "long" ,
599
- type : "disjunction" ,
600
- } ) ;
0 commit comments