From 3efbb9b457802fa2fd3253a50551779229ce67dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=98=81?= <77565980+abyss-s@users.noreply.github.com> Date: Sat, 14 Sep 2024 21:04:10 +0900 Subject: [PATCH] =?UTF-8?q?Chore:=20=EB=B8=8C=EB=9D=BC=EC=9A=B0=EC=A0=80?= =?UTF-8?q?=20=EC=BA=90=EC=8B=9C=20=EC=83=88=EB=A1=9C=EA=B3=A0=EC=B9=A8?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- firebase.json | 11 +++++++++++ vite.config.js | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/firebase.json b/firebase.json index 6564edd..c2cc424 100644 --- a/firebase.json +++ b/firebase.json @@ -7,6 +7,17 @@ "source": "**", "destination": "/index.html" } + ], + "headers": [ + { + "source": "/index.html", + "headers": [ + { + "key": "Cache-Control", + "value": "no-cache" + } + ] + } ] } } diff --git a/vite.config.js b/vite.config.js index a47f09d..70fca6d 100644 --- a/vite.config.js +++ b/vite.config.js @@ -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로 설정