From 16e358d647eea2755ef16458477a694b9dd4d1bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=86=8C=EC=9A=B8=EC=B9=98=ED=82=A8?= <90738604+soulchicken@users.noreply.github.com> Date: Wed, 25 Oct 2023 21:54:47 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20PWA=20=EB=82=B4=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=BA=90=EC=8B=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- next.config.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/next.config.js b/next.config.js index 8cd58ad..26749da 100644 --- a/next.config.js +++ b/next.config.js @@ -37,7 +37,19 @@ const config = { const nextConfig = withPWA({ dest: 'public', - runtimeCaching: [], + runtimeCaching: [ + { + urlPattern: /\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i, + handler: 'StaleWhileRevalidate', + options: { + cacheName: 'static-image-assets', + expiration: { + maxEntries: 64, + maxAgeSeconds: 24 * 60 * 60, // 24 hours + }, + }, + }, + ], disableDevLogs: true, })(config);