File tree Expand file tree Collapse file tree 6 files changed +14
-18
lines changed
packages/react-router-dev Expand file tree Collapse file tree 6 files changed +14
-18
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,6 @@ describe("remix CLI", () => {
121121 --config, -c Use specified Vite config file (string)
122122 --no-typescript Generate plain JavaScript files
123123 \`typegen\` Options:
124- --config, -c Use specified Vite config file (string)
125124 --watch Automatically regenerate types whenever route config (\`routes.ts\`) or route modules change
126125
127126 Build your project:
@@ -150,8 +149,7 @@ describe("remix CLI", () => {
150149 Generate types for route modules:
151150
152151 $ react-router typegen
153- $ react-router typegen --watch
154- $ react-router typegen --config vite.react-router.config.ts"
152+ $ react-router typegen --watch"
155153 ` ) ;
156154 } ) ;
157155 } ) ;
Original file line number Diff line number Diff line change @@ -197,16 +197,13 @@ async function createClientEntry(
197197 return contents ;
198198}
199199
200- export async function typegen (
201- root : string ,
202- flags : { watch : boolean ; config ?: string }
203- ) {
200+ export async function typegen ( root : string , flags : { watch : boolean } ) {
204201 root ??= process . cwd ( ) ;
205202
206203 if ( flags . watch ) {
207- await Typegen . watch ( root , flags . config ) ;
204+ await Typegen . watch ( root ) ;
208205 await new Promise ( ( ) => { } ) ; // keep alive
209206 return ;
210207 }
211- await Typegen . run ( root , flags . config ) ;
208+ await Typegen . run ( root ) ;
212209}
Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ ${colors.blueBright("react-router")}
4646 --config, -c Use specified Vite config file (string)
4747 --no-typescript Generate plain JavaScript files
4848 \`typegen\` Options:
49- --config, -c Use specified Vite config file (string)
5049 --watch Automatically regenerate types whenever route config (\`routes.ts\`) or route modules change
5150
5251 ${ colors . underline ( "Build your project" ) } :
@@ -76,7 +75,6 @@ ${colors.blueBright("react-router")}
7675
7776 $ react-router typegen
7877 $ react-router typegen --watch
79- $ react-router typegen --config vite.react-router.config.ts
8078` ;
8179
8280/**
Original file line number Diff line number Diff line change 3535 "react-router" : " bin.js"
3636 },
3737 "scripts" : {
38- "build" : " wireit"
38+ "build" : " wireit" ,
39+ "typecheck" : " tsc"
3940 },
4041 "wireit" : {
4142 "build" : {
Original file line number Diff line number Diff line change 66 "target" : " ES2022" ,
77 "module" : " ES2022" ,
88 "moduleResolution" : " Bundler" ,
9- "resolveJsonModule" : true ,
10- "allowSyntheticDefaultImports" : true ,
9+
1110 "strict" : true ,
1211 "jsx" : " react" ,
12+
1313 "skipLibCheck" : true ,
14- "declaration" : true ,
15- "emitDeclarationOnly " : true ,
14+
15+ "outDir " : " dist " ,
1616 "rootDir" : " ." ,
17- "outDir" : " ./dist"
17+ "noEmit" : true ,
18+ "resolveJsonModule" : true ,
19+ "allowSyntheticDefaultImports" : true
1820 }
1921}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type { ServerBuild } from "react-router";
33import { matchRoutes } from "react-router" ;
44import type { ModuleNode , ViteDevServer } from "vite" ;
55
6- import type { ResolvedReactRouterConfig } from "./config" ;
6+ import type { ResolvedReactRouterConfig } from "../config /config" ;
77import { resolveFileUrl } from "./resolve-file-url" ;
88
99type ServerRouteManifest = ServerBuild [ "routes" ] ;
You can’t perform that action at this time.
0 commit comments