fix(web): reactRouter basename not work

This commit is contained in:
ReaJason
2025-08-14 18:52:31 +08:00
parent 8b27536d80
commit 2333711a0f
2 changed files with 3 additions and 5 deletions
+1 -5
View File
@@ -1,6 +1,5 @@
import { createHashRouter } from "react-router-dom";
import RootLayout from "@/components/layouts/root-layout";
import { env } from "@/config";
import MemShellPage from "@/pages/memshell";
import ProbeShellPage from "@/pages/probeshell";
import type { MemShellFormSchema } from "@/types/schema";
@@ -96,8 +95,5 @@ export const router = createHashRouter(
},
],
},
],
{
basename: env.BASE_PATH,
},
]
);
+2
View File
@@ -2,9 +2,11 @@ import path from "node:path";
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import { env } from "node:process";
// https://vitejs.dev/config/
export default defineConfig({
base: env.VITE_APP_BASE_PATH,
plugins: [react(), tailwindcss()],
resolve: {
alias: {