Skip to content

Commit daa3a56

Browse files
committed
chore: Tanstack Query 관련 파일 app 디렉토리로 이동
1 parent f0d8217 commit daa3a56

File tree

7 files changed

+120
-113
lines changed

7 files changed

+120
-113
lines changed

apps/frontend/src/app/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { createRoot } from "react-dom/client";
33
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
44
import { RouterProvider, createRouter } from "@tanstack/react-router";
55
import "../shared/index.css";
6-
import { routeTree } from "@/routeTree.gen";
6+
import { routeTree } from "@/app/routeTree.gen";
77

88
const queryClient = new QueryClient();
99

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
/* eslint-disable */
2+
3+
// @ts-nocheck
4+
5+
// noinspection JSUnusedGlobalSymbols
6+
7+
// This file was automatically generated by TanStack Router.
8+
// You should NOT make any changes in this file as it will be overwritten.
9+
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
10+
11+
// Import Routes
12+
13+
import { Route as rootRoute } from "./routes/__root";
14+
import { Route as IndexImport } from "./routes/index";
15+
import { Route as WorkspaceWorkspaceIdImport } from "./routes/workspace/$workspaceId";
16+
17+
// Create/Update Routes
18+
19+
const IndexRoute = IndexImport.update({
20+
id: "/",
21+
path: "/",
22+
getParentRoute: () => rootRoute,
23+
} as any);
24+
25+
const WorkspaceWorkspaceIdRoute = WorkspaceWorkspaceIdImport.update({
26+
id: "/workspace/$workspaceId",
27+
path: "/workspace/$workspaceId",
28+
getParentRoute: () => rootRoute,
29+
} as any);
30+
31+
// Populate the FileRoutesByPath interface
32+
33+
declare module "@tanstack/react-router" {
34+
interface FileRoutesByPath {
35+
"/": {
36+
id: "/";
37+
path: "/";
38+
fullPath: "/";
39+
preLoaderRoute: typeof IndexImport;
40+
parentRoute: typeof rootRoute;
41+
};
42+
"/workspace/$workspaceId": {
43+
id: "/workspace/$workspaceId";
44+
path: "/workspace/$workspaceId";
45+
fullPath: "/workspace/$workspaceId";
46+
preLoaderRoute: typeof WorkspaceWorkspaceIdImport;
47+
parentRoute: typeof rootRoute;
48+
};
49+
}
50+
}
51+
52+
// Create and export the route tree
53+
54+
export interface FileRoutesByFullPath {
55+
"/": typeof IndexRoute;
56+
"/workspace/$workspaceId": typeof WorkspaceWorkspaceIdRoute;
57+
}
58+
59+
export interface FileRoutesByTo {
60+
"/": typeof IndexRoute;
61+
"/workspace/$workspaceId": typeof WorkspaceWorkspaceIdRoute;
62+
}
63+
64+
export interface FileRoutesById {
65+
__root__: typeof rootRoute;
66+
"/": typeof IndexRoute;
67+
"/workspace/$workspaceId": typeof WorkspaceWorkspaceIdRoute;
68+
}
69+
70+
export interface FileRouteTypes {
71+
fileRoutesByFullPath: FileRoutesByFullPath;
72+
fullPaths: "/" | "/workspace/$workspaceId";
73+
fileRoutesByTo: FileRoutesByTo;
74+
to: "/" | "/workspace/$workspaceId";
75+
id: "__root__" | "/" | "/workspace/$workspaceId";
76+
fileRoutesById: FileRoutesById;
77+
}
78+
79+
export interface RootRouteChildren {
80+
IndexRoute: typeof IndexRoute;
81+
WorkspaceWorkspaceIdRoute: typeof WorkspaceWorkspaceIdRoute;
82+
}
83+
84+
const rootRouteChildren: RootRouteChildren = {
85+
IndexRoute: IndexRoute,
86+
WorkspaceWorkspaceIdRoute: WorkspaceWorkspaceIdRoute,
87+
};
88+
89+
export const routeTree = rootRoute
90+
._addFileChildren(rootRouteChildren)
91+
._addFileTypes<FileRouteTypes>();
92+
93+
/* ROUTE_MANIFEST_START
94+
{
95+
"routes": {
96+
"__root__": {
97+
"filePath": "__root.tsx",
98+
"children": [
99+
"/",
100+
"/workspace/$workspaceId"
101+
]
102+
},
103+
"/": {
104+
"filePath": "index.tsx"
105+
},
106+
"/workspace/$workspaceId": {
107+
"filePath": "workspace/$workspaceId.tsx"
108+
}
109+
}
110+
}
111+
ROUTE_MANIFEST_END */
File renamed without changes.

apps/frontend/src/routeTree.gen.ts

Lines changed: 0 additions & 111 deletions
This file was deleted.

apps/frontend/vite.config.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ import { TanStackRouterVite } from "@tanstack/router-plugin/vite";
66

77
// https://vite.dev/config/
88
export default defineConfig({
9-
plugins: [TanStackRouterVite(), react(), tsconfigPaths()],
9+
plugins: [
10+
TanStackRouterVite({
11+
routesDirectory: "./src/app/routes",
12+
generatedRouteTree: "./src/app/routeTree.gen.ts",
13+
}),
14+
react(),
15+
tsconfigPaths(),
16+
],
1017
css: {
1118
postcss: {
1219
plugins: [tailwindcss()],

0 commit comments

Comments
 (0)