Skip to content

Commit 6b30424

Browse files
authored
Fixed manifest 404 errors (#556)
1 parent 7881f6d commit 6b30424

File tree

7 files changed

+240
-131
lines changed

7 files changed

+240
-131
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ tsconfig.tsbuildinfo
7979

8080
# Service workers
8181
*.js.map
82-
sw.js
83-
sw.js.map
8482
workbox-*.js
8583
worker-*.js
8684

next.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,23 @@ const nextConfig = {
4444
},
4545
],
4646
},
47+
{
48+
source: '/sw.js',
49+
headers: [
50+
{
51+
key: 'Content-Type',
52+
value: 'application/javascript; charset=utf-8',
53+
},
54+
{
55+
key: 'Cache-Control',
56+
value: 'public, max-age=0, must-revalidate',
57+
},
58+
{
59+
key: 'Service-Worker-Allowed',
60+
value: '/',
61+
},
62+
],
63+
},
4764
];
4865
},
4966

package-lock.json

Lines changed: 85 additions & 86 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)