Skip to content

Commit 087ece6

Browse files
fix(router): use hash history for gh pages
1 parent 5da8c45 commit 087ece6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { createRouter, RouterProvider } from "@tanstack/react-router"
1+
import {
2+
createHashHistory,
3+
createRouter,
4+
RouterProvider,
5+
} from "@tanstack/react-router"
26
import ReactDOM from "react-dom/client"
37
import { routeTree } from "./routeTree.gen"
48
import "./index.css"
@@ -8,6 +12,7 @@ const router = createRouter({
812
routeTree,
913
defaultPreload: "intent",
1014
scrollRestoration: true,
15+
history: createHashHistory(), // gh pages
1116
})
1217

1318
// Register things for typesafety

0 commit comments

Comments
 (0)