mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-21 22:50:42 +08:00
fix(web): reactRouter basename not work
This commit is contained in:
+1
-5
@@ -1,6 +1,5 @@
|
|||||||
import { createHashRouter } from "react-router-dom";
|
import { createHashRouter } from "react-router-dom";
|
||||||
import RootLayout from "@/components/layouts/root-layout";
|
import RootLayout from "@/components/layouts/root-layout";
|
||||||
import { env } from "@/config";
|
|
||||||
import MemShellPage from "@/pages/memshell";
|
import MemShellPage from "@/pages/memshell";
|
||||||
import ProbeShellPage from "@/pages/probeshell";
|
import ProbeShellPage from "@/pages/probeshell";
|
||||||
import type { MemShellFormSchema } from "@/types/schema";
|
import type { MemShellFormSchema } from "@/types/schema";
|
||||||
@@ -96,8 +95,5 @@ export const router = createHashRouter(
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
{
|
|
||||||
basename: env.BASE_PATH,
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,9 +2,11 @@ import path from "node:path";
|
|||||||
import tailwindcss from "@tailwindcss/vite";
|
import tailwindcss from "@tailwindcss/vite";
|
||||||
import react from "@vitejs/plugin-react";
|
import react from "@vitejs/plugin-react";
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
|
import { env } from "node:process";
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
base: env.VITE_APP_BASE_PATH,
|
||||||
plugins: [react(), tailwindcss()],
|
plugins: [react(), tailwindcss()],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
|
|||||||
Reference in New Issue
Block a user