MCPcopy Index your code
hub / github.com/TanStack/router / parseStartConfig

Function parseStartConfig

packages/start-plugin-core/src/schema.ts:64–100  ·  view source on GitHub ↗
(
  opts: z.input<typeof tanstackStartOptionsSchema>,
  corePluginOpts: TanStackStartVitePluginCoreOptions,
  root: string,
)

Source from the content-addressed store, hash-verified

62 .optional()
63
64export function parseStartConfig(
65 opts: z.input<typeof tanstackStartOptionsSchema>,
66 corePluginOpts: TanStackStartVitePluginCoreOptions,
67 root: string,
68) {
69 const options = tanstackStartOptionsSchema.parse(opts)
70
71 const srcDirectory = options.srcDirectory
72
73 const routesDirectory = path.resolve(
74 root,
75 srcDirectory,
76 options.router.routesDirectory ?? 'routes',
77 )
78
79 const generatedRouteTree = path.resolve(
80 root,
81 srcDirectory,
82 options.router.generatedRouteTree ?? 'routeTree.gen.ts',
83 )
84
85 return {
86 ...options,
87 router: {
88 ...options.router,
89 ...getConfig(
90 {
91 ...options.router,
92 routesDirectory,
93 generatedRouteTree,
94 },
95 root,
96 ),
97 target: corePluginOpts.framework,
98 },
99 }
100}
101
102const pageSitemapOptionsSchema = z.object({
103 exclude: z.boolean().optional(),

Callers 1

getConfigFunction · 0.90

Calls 3

getConfigFunction · 0.90
resolveMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected