Skip to content

Commit

Permalink
fix icons
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedBedeir committed Nov 4, 2023
1 parent dcea8ad commit bd1e6ac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const router = createBrowserRouter(
},
],
{
basename: "/admin-dashboard/",
basename: import.meta.env.DEV ? "/" : "/admin-dashboard/",
}
);
function App() {
Expand Down
14 changes: 11 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@ import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'

// https://vitejs.dev/config/
export default defineConfig({
base: "/admin-dashboard/",
plugins: [react()],
export default defineConfig(({ command }) => {
const config = {
plugins: [react()],
base: '/',
}

if (command !== 'serve') {
config.base = '/admin-dashboard/'
}

return config
})

0 comments on commit bd1e6ac

Please sign in to comment.