git ssb

0+

Rômulo Alves / plainbudget-next



Commit 0e149ed1e49805506189850e99b11ef2da51a5c9

Fixes next-offline config

romuloalves committed on 6/24/2019, 12:31:27 PM
Parent: f7fae0895ef6595ffae8b99aa9fbb72bde7ecaa2

Files changed

next.config.jschanged
next.config.jsView
@@ -1,3 +1,26 @@
11 const withOffline = require('next-offline');
22
3-module.exports = withOffline({});
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