Skip to content

Commit

Permalink
Fix: 배포경로 테스트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yongseong2 committed Nov 4, 2024
1 parent 48c9647 commit 267c406
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import './index.css';
import { BrowserRouter } from 'react-router-dom';

createRoot(document.getElementById('root')!).render(
<BrowserRouter basename={import.meta.env.DEV ? '/' : '/sumbisori-frontend/'}>
<BrowserRouter basename={import.meta.env.PROD ? '/sumbisori-frontend' : '/'}>
<App />
</BrowserRouter>,
);
1 change: 1 addition & 0 deletions src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { DictionaryRegistration } from '../pages/DictionaryRegistration';
import { DictionaryConfirm } from '../pages/DictionaryConfirm';

export const Router = () => {
console.log(import.meta.env.PROD);
return (
<Routes>
<Route path="/login" element={<Login />} />
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import react from '@vitejs/plugin-react-swc';

// https://vite.dev/config/
export default defineConfig({
base: process.env.NODE_ENV === 'production' ? '/sumbisori-frontend/' : '/',
base: '/',
plugins: [react()],
server: {
port: 3000,
Expand Down

0 comments on commit 267c406

Please sign in to comment.