Skip to content

Commit

Permalink
fix : basepath issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Safouene1 committed Apr 26, 2024
1 parent dd16be5 commit 8de559e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,5 @@ export const router = createBrowserRouter(
element: <NoMatch />,
},
],
{
basename: global.basename,
},

);
4 changes: 1 addition & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ import dotenv from "dotenv";
const basenameProd = "/";

export default defineConfig(({ command }) => {
const isProd = command === "build";
dotenv.config();
const { VITE_BACKEND_PORT } = process.env;
const VITE_BACKEND_URL = `http://localhost:${VITE_BACKEND_PORT}`;
return {
base: isProd ? basenameProd : "",
plugins: [react()],
resolve: {
alias: {
Expand All @@ -26,6 +24,6 @@ export default defineConfig(({ command }) => {
},
},
},

define: {},
};
});

0 comments on commit 8de559e

Please sign in to comment.