diff --git a/web/.env b/web/.env index 292fa09d..1f867a91 100644 --- a/web/.env +++ b/web/.env @@ -1 +1,2 @@ -VITE_APP_API_URL=http://127.0.0.1:8080 \ No newline at end of file +VITE_APP_API_URL=http://127.0.0.1:8080 +VITE_APP_BASE_PATH=/ \ No newline at end of file diff --git a/web/.env.production b/web/.env.production index 7decfda6..7ff78958 100644 --- a/web/.env.production +++ b/web/.env.production @@ -1 +1,2 @@ -VITE_APP_API_URL= \ No newline at end of file +VITE_APP_API_URL= +VITE_APP_BASE_PATH=/ \ No newline at end of file diff --git a/web/bun.lockb b/web/bun.lockb index 74e0eb97..0de4d625 100755 Binary files a/web/bun.lockb and b/web/bun.lockb differ diff --git a/web/package.json b/web/package.json index 95c7de10..b852a30f 100644 --- a/web/package.json +++ b/web/package.json @@ -13,19 +13,19 @@ }, "devDependencies": { "@biomejs/biome": "1.9.4", - "@tanstack/router-plugin": "^1.106.0", - "@types/node": "^22.13.4", + "@tanstack/router-plugin": "^1.109.2", + "@types/node": "^22.13.5", "@types/react": "^19.0.10", "@types/react-dom": "^19.0.4", "@vitejs/plugin-react": "^4.3.4", "@types/react-copy-to-clipboard": "^5.0.7", "@types/react-syntax-highlighter": "^15.5.13", - "tailwindcss": "^4.0.7", + "tailwindcss": "^4.0.8", "typescript": "^5.7.3", "vite": "^6.1.1" }, "dependencies": { - "@hookform/resolvers": "^4.1.0", + "@hookform/resolvers": "^4.1.1", "@radix-ui/react-alert-dialog": "^1.1.6", "@radix-ui/react-checkbox": "^1.1.4", "@radix-ui/react-dropdown-menu": "^2.1.6", @@ -37,10 +37,10 @@ "@radix-ui/react-switch": "^1.1.3", "@radix-ui/react-tabs": "^1.1.3", "@radix-ui/react-tooltip": "^1.1.8", - "@tailwindcss/vite": "^4.0.7", - "@tanstack/react-query": "^5.66.8", - "@tanstack/react-router": "^1.106.0", - "@tanstack/router-devtools": "^1.106.0", + "@tailwindcss/vite": "^4.0.8", + "@tanstack/react-query": "^5.66.9", + "@tanstack/react-router": "^1.109.2", + "@tanstack/router-devtools": "^1.109.2", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "i18next": "^24.2.2", diff --git a/web/src/config.ts b/web/src/config.ts index 729555e3..88ac4e44 100644 --- a/web/src/config.ts +++ b/web/src/config.ts @@ -2,6 +2,7 @@ import * as z from "zod"; const EnvSchema = z.object({ API_URL: z.optional(z.string()), + BASE_PATH: z.optional(z.string()), MODE: z.string(), }); diff --git a/web/src/main.tsx b/web/src/main.tsx index e6c4a850..4a293442 100644 --- a/web/src/main.tsx +++ b/web/src/main.tsx @@ -12,6 +12,7 @@ const queryClient = new QueryClient(); const router = createRouter({ routeTree, + basepath: env.BASE_PATH, defaultPreload: "intent", }); diff --git a/web/vite.config.ts b/web/vite.config.ts index a8690dd3..e912c489 100644 --- a/web/vite.config.ts +++ b/web/vite.config.ts @@ -6,7 +6,7 @@ import { defineConfig } from "vite"; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [TanStackRouterVite({}), react(), tailwindcss()], + plugins: [TanStackRouterVite(), react(), tailwindcss()], resolve: { alias: { "@": path.resolve(__dirname, "./src"),