22 lines
663 B
TypeScript
22 lines
663 B
TypeScript
import { createHashHistory, createRouter } from '@tanstack/react-router';
|
|
import { rootRoute } from './routes/__root';
|
|
import { indexRoute } from './routes/index';
|
|
|
|
/**
|
|
* Hash-based history (NFR Requirements decision): the confirmed deployment target is a
|
|
* traditional FTP/static web host, where server-side rewrite rules are not guaranteed.
|
|
* Hash history works on any static host with zero server configuration.
|
|
*/
|
|
const routeTree = rootRoute.addChildren([indexRoute]);
|
|
|
|
export const router = createRouter({
|
|
routeTree,
|
|
history: createHashHistory(),
|
|
});
|
|
|
|
declare module '@tanstack/react-router' {
|
|
interface Register {
|
|
router: typeof router;
|
|
}
|
|
}
|