Skip to content

Commit

Permalink
change root
Browse files Browse the repository at this point in the history
  • Loading branch information
jakehobbs committed Jan 16, 2024
1 parent 4ea1011 commit d4e5755
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
src/routeTree.gen.ts
src/routeTree.gen.ts
pnpm-lock.yaml
2 changes: 1 addition & 1 deletion index.html → src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/app.tsx"></script>
<script type="module" src="./app.tsx"></script>
</body>
</html>
26 changes: 13 additions & 13 deletions src/routeTree.gen.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import { FileRoute, lazyRouteComponent } from "@tanstack/react-router";
import { FileRoute, lazyRouteComponent } from '@tanstack/react-router'

import { Route as rootRoute } from "./routes/__root";
import { Route as rootRoute } from './routes/__root'

const IndexComponentImport = new FileRoute("/").createRoute();
const IndexComponentImport = new FileRoute('/').createRoute()

const IndexComponentRoute = IndexComponentImport.update({
path: "/",
path: '/',
getParentRoute: () => rootRoute,
} as any).update({
component: lazyRouteComponent(
() => import("./routes/index.component"),
"component",
() => import('./routes/index.component'),
'component',
),
});
declare module "@tanstack/react-router" {
})
declare module '@tanstack/react-router' {
interface FileRoutesByPath {
"/": {
preLoaderRoute: typeof IndexComponentImport;
parentRoute: typeof rootRoute;
};
'/': {
preLoaderRoute: typeof IndexComponentImport
parentRoute: typeof rootRoute
}
}
}
export const routeTree = rootRoute.addChildren([IndexComponentRoute]);
export const routeTree = rootRoute.addChildren([IndexComponentRoute])
6 changes: 2 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
"noFallthroughCasesInSwitch": true,

"paths": {
"~/*": [
"./src/*"
]
},
"~/*": ["./src/*"]
}
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import path from "path";

// https://vitejs.dev/config/
export default defineConfig({
root: "src",
plugins: [react(), TanStackRouterVite()],
resolve: {
alias: {
Expand Down

0 comments on commit d4e5755

Please sign in to comment.