Skip to content

Commit

Permalink
Chore: 브라우저 캐시 새로고침하도록 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
abyss-s committed Sep 14, 2024
1 parent c545a03 commit 3efbb9b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@
"source": "**",
"destination": "/index.html"
}
],
"headers": [
{
"source": "/index.html",
"headers": [
{
"key": "Cache-Control",
"value": "no-cache"
}
]
}
]
}
}
6 changes: 5 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ export default defineConfig({
.split("/")[0]
.toString();
}
}
},
// 파일 이름에 해시 추가하여 캐시된 버전이 아닌 최신 파일을 로드하도록 설정
entryFileNames: "assets/[name].[hash].js",
chunkFileNames: "assets/[name].[hash].js",
assetFileNames: "assets/[name].[hash].[ext]"
}
},
chunkSizeWarningLimit: 500 // 청크 사이즈 경고를 500kb로 설정
Expand Down

0 comments on commit 3efbb9b

Please sign in to comment.