[!HOTFIX] Vercel SPA fallback rewrite로 새로고침 404 해결#24
Conversation
새로고침 시 클라이언트 라우트가 404로 떨어지던 문제 해결. 모든 경로를 /index.html로 rewrite하여 React Router가 처리하도록 vercel.json 추가.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 PR 요약
vercel.json에 SPA fallback rewrite 추가🧾 관련 이슈
🛠️ 주요 변경 사항
vercel.json신규 추가{ "rewrites": [ { "source": "/(.*)", "destination": "/index.html" } ] }/index.html로 위임 → React Router가 클라이언트 사이드 라우팅 처리🧠 의도 및 배경
/payments,/matches같은 클라이언트 라우트는 빌드 결과물에 실제 정적 파일로 존재하지 않음index.html로 fallback하면 SPA가 로드되고 React Router가 URL을 보고 알맞은 페이지를 렌더링