Browse Source

add runtimeCaching

AykutSarac 2 năm trước cách đây
mục cha
commit
3776109953
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      next.config.js

+ 2 - 0
next.config.js

@@ -1,4 +1,5 @@
 const withPWA = require("next-pwa");
 const withPWA = require("next-pwa");
+const runtimeCaching = require("next-pwa/cache");
 
 
 /**
 /**
  * @type {import('next').NextConfig}
  * @type {import('next').NextConfig}
@@ -14,6 +15,7 @@ const nextConfig = {
   },
   },
   pwa: {
   pwa: {
     disable: process.env.NODE_ENV === "development",
     disable: process.env.NODE_ENV === "development",
+    runtimeCaching,
     dest: "public",
     dest: "public",
     register: true,
     register: true,
     fallbacks: {
     fallbacks: {