You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
carbon/next.config.js

25 lines
543 B
JavaScript

const withOffline = require('next-offline')
module.exports = withOffline({
target: 'serverless',
dontAutoRegisterSw: true,
workboxOpts: {
// TODO get default config from `next-offline`?
swDest: 'static/service-worker.js',
globPatterns: ['static/**/*'],
globDirectory: '.',
runtimeCaching: [
{
urlPattern: /^https?.*/,
handler: 'NetworkFirst',
options: {
cacheName: 'offlineCache',
expiration: {
maxEntries: 200
}
}
}
]
}
})