forked from kawalcovid19/wargabantuwarga.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wb.config.js
47 lines (47 loc) · 1.06 KB
/
wb.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Read more about next-pwa configuation
// https://github.com/shadowwalker/next-pwa
module.exports = {
disable: process.env.NODE_ENV === "development",
dest: "public",
register: true,
scope: "/",
sw: "service-worker.js",
publicExcludes: [
"/robots.txt",
"/sitemap.xml",
"/sitemap-*.xml",
"/google6feea491511f41d3.html",
"/admin/**/*",
],
runtimeCaching: [
{
urlPattern: /^https:\/\/res\.cloudinary\.com\/.*\/image\/upload\//,
handler: "CacheFirst",
options: {
cacheName: "wbw-images",
expiration: {
maxAgeSeconds: 60 * 60 * 24 * 30,
maxEntries: 200,
},
},
},
{
urlPattern: /.(png|jpg|jpeg|webp|svg|woff|woff2)$/,
handler: "CacheFirst",
options: {
cacheName: "wbw-assets",
expiration: {
maxAgeSeconds: 60 * 60 * 24 * 7,
maxEntries: 50,
},
},
},
{
urlPattern: /.(js|css)$/,
handler: "StaleWhileRevalidate",
options: {
cacheName: "wbw-jscss",
},
},
],
};