Files: 0e149ed1e49805506189850e99b11ef2da51a5c9 / next.config.js
580 bytesRaw
1 | const withOffline = require('next-offline'); |
2 | |
3 | const nextConfig = { |
4 | workboxOpts: { |
5 | swDest: 'static/service-worker.js', |
6 | runtimeCaching: [ |
7 | { |
8 | urlPattern: /^https?.*/, |
9 | handler: 'NetworkFirst', |
10 | options: { |
11 | cacheName: 'https-calls', |
12 | networkTimeoutSeconds: 15, |
13 | expiration: { |
14 | maxEntries: 150, |
15 | maxAgeSeconds: 30 * 24 * 60 * 60 // 1 month |
16 | }, |
17 | cacheableResponse: { |
18 | statuses: [0, 200] |
19 | } |
20 | } |
21 | } |
22 | ] |
23 | } |
24 | } |
25 | |
26 | module.exports = withOffline(nextConfig); |
Built with git-ssb-web