소스 검색

fix routing fallback

AykutSarac 3 년 전
부모
커밋
9e7316ab31
4개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 1
      next.config.js
  2. 1 1
      public/fallback-development.js
  3. 0 0
      public/sw.js.map
  4. 0 0
      src/pages/editor/index.tsx

+ 3 - 1
next.config.js

@@ -13,9 +13,11 @@ const nextConfig = {
     styledComponents: true,
   },
   pwa: {
-    disable: process.env.NODE_ENV === "development",
     dest: "public",
     register: true,
+    fallbacks: {
+      document: "/editor",
+    },
   },
 };
 

+ 1 - 1
public/fallback-development.js

@@ -7,7 +7,7 @@ self.fallback = async request => {
   // https://developer.mozilla.org/en-US/docs/Web/API/RequestDestination
   switch (request.destination) {
     case 'document':
-      if (true) return caches.match("/_offline", {
+      if (true) return caches.match("/editor", {
         ignoreSearch: true
       });
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
public/sw.js.map


+ 0 - 0
src/pages/_offline.tsx → src/pages/editor/index.tsx


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.