fix: 배포 후 청크 로드 실패 시 자동 새로고침 + index.html no-cache
CI / build (push) Failing after 14m26s

- 모바일 웹에서 옛 index.html 캐시가 삭제된 옛 청크를 불러 메뉴(가계부 내역 등)가
  안 열리는 문제 → router.onError 로 청크 실패 감지 시 목적지로 전체 새로고침
- nginx 설정에 index.html no-cache 추가(재발 방지) — 서버 적용 필요

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-06-03 18:11:51 +09:00
parent 7acd2163fb
commit f45be09ff1
2 changed files with 20 additions and 1 deletions
+8 -1
View File
@@ -11,7 +11,14 @@ server {
try_files $uri $uri/ /index.html;
}
# 해시 자산 장기 캐시
# index.html 은 캐시 금지 — 배포로 청크 해시가 바뀌어도 항상 최신 진입점을 받도록.
# (캐시되면 옛 index.html 이 삭제된 옛 청크를 불러 메뉴가 안 열리는 문제 발생)
location = /index.html {
add_header Cache-Control "no-cache, no-store, must-revalidate";
expires -1;
}
# 해시 자산 장기 캐시 (파일명에 해시가 있어 immutable 안전)
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";