diff --git a/webui2/package.json b/webui2/package.json index 22b3dbefd4d4f3fc2dad5f28adbf221a46653ad1..87fd60fea409277786b256528f6576c2cd644248 100644 --- a/webui2/package.json +++ b/webui2/package.json @@ -75,7 +75,6 @@ "typescript": "^6.0.2", "vite": "^8.0.3", "vite-plugin-svgr": "^5.0.0", - "vite-tsconfig-paths": "^6.1.1", "vitest": "^4.1.2" }, "packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319" diff --git a/webui2/pnpm-lock.yaml b/webui2/pnpm-lock.yaml index 0c08973f8063ec1cdb6916afd8d0ef8a34138418..f1ed3d65b4d4a285f910f8e780e01c9df2bd1e46 100644 --- a/webui2/pnpm-lock.yaml +++ b/webui2/pnpm-lock.yaml @@ -174,9 +174,6 @@ importers: vite-plugin-svgr: specifier: ^5.0.0 version: 5.0.0(typescript@6.0.2)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) - vite-tsconfig-paths: - specifier: ^6.1.1 - version: 6.1.1(typescript@6.0.2)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) vitest: specifier: ^4.1.2 version: 4.1.2(@types/node@25.5.0)(@vitest/browser-playwright@4.1.2)(happy-dom@20.8.9)(jsdom@29.0.1)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) @@ -3287,9 +3284,6 @@ packages: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} - globrex@0.1.2: - resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} - graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -4541,16 +4535,6 @@ packages: ts-log@2.2.7: resolution: {integrity: sha512-320x5Ggei84AxzlXp91QkIGSw5wgaLT6GeAH0KsqDmRZdVWW2OiSeVvElVoatk3f7nicwXlElXsoFkARiGE2yg==} - tsconfck@3.1.6: - resolution: {integrity: sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w==} - engines: {node: ^18 || >=20} - hasBin: true - peerDependencies: - typescript: ^5.0.0 - peerDependenciesMeta: - typescript: - optional: true - tsconfig-paths@4.2.0: resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} engines: {node: '>=6'} @@ -4687,11 +4671,6 @@ packages: peerDependencies: vite: '>=3.0.0' - vite-tsconfig-paths@6.1.1: - resolution: {integrity: sha512-2cihq7zliibCCZ8P9cKJrQBkfgdvcFkOOc3Y02o3GWUDLgqjWsZudaoiuOwO/gzTzy17cS5F7ZPo4bsnS4DGkg==} - peerDependencies: - vite: '*' - vite@8.0.3: resolution: {integrity: sha512-B9ifbFudT1TFhfltfaIPgjo9Z3mDynBTJSUYxTjOQruf/zHH+ezCQKcoqO+h7a9Pw9Nm/OtlXAiGT1axBgwqrQ==} engines: {node: ^20.19.0 || >=22.12.0} @@ -8018,8 +7997,6 @@ snapshots: merge2: 1.4.1 slash: 3.0.0 - globrex@0.1.2: {} - graceful-fs@4.2.11: {} graphql-config@5.1.6(@types/node@25.5.0)(graphql@16.13.2)(typescript@6.0.2): @@ -9632,10 +9609,6 @@ snapshots: ts-log@2.2.7: {} - tsconfck@3.1.6(typescript@6.0.2): - optionalDependencies: - typescript: 6.0.2 - tsconfig-paths@4.2.0: dependencies: json5: 2.2.3 @@ -9785,16 +9758,6 @@ snapshots: - supports-color - typescript - vite-tsconfig-paths@6.1.1(typescript@6.0.2)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)): - dependencies: - debug: 4.4.3 - globrex: 0.1.2 - tsconfck: 3.1.6(typescript@6.0.2) - vite: 8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3) - transitivePeerDependencies: - - supports-color - - typescript - vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3): dependencies: lightningcss: 1.32.0 diff --git a/webui2/vite.config.ts b/webui2/vite.config.ts index 95bcfbe91794bb3b4121fabdd4815c618399a997..98c5f9f7040fa5feba1acfe7c008007694c4265d 100644 --- a/webui2/vite.config.ts +++ b/webui2/vite.config.ts @@ -1,9 +1,12 @@ import tailwindcss from "@tailwindcss/vite"; import { tanstackRouter } from "@tanstack/router-plugin/vite"; import react from "@vitejs/plugin-react"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; import { defineConfig } from "vite"; import svgr from "vite-plugin-svgr"; -import tsconfigPaths from "vite-tsconfig-paths"; + +const dirname = path.dirname(fileURLToPath(import.meta.url)); // The Go backend URL. Run: git-bug webui --port 3000 const API_URL = process.env.VITE_API_URL || "http://localhost:3000"; @@ -11,11 +14,15 @@ const API_URL = process.env.VITE_API_URL || "http://localhost:3000"; export default defineConfig({ plugins: [ tanstackRouter({ target: "react", autoCodeSplitting: true }), - tsconfigPaths(), svgr(), tailwindcss(), react(), ], + resolve: { + alias: { + "@": path.resolve(dirname, "src"), + }, + }, server: { proxy: { "/graphql": { target: API_URL, changeOrigin: true },