MCPcopy Create free account
hub / github.com/TanStack/router / createRouteCode

Function createRouteCode

packages/router-plugin/tests/code-splitter.test.ts:182–192  ·  view source on GitHub ↗
(splitType: string)

Source from the content-addressed store, hash-verified

180 ] as const
181
182 function createRouteCode(splitType: string) {
183 return `
184import { createFileRoute } from '@tanstack/react-router'
185
186export const Route = createFileRoute('/')({ ${splitType} })
187
188function ${splitType}() {
189 return <div>lowercase function declaration</div>
190}
191`
192 }
193
194 it.each(splitComponentCases)(
195 'renames a lowercase $splitType binding when HMR is enabled',

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected