19 lines
396 B
JavaScript
19 lines
396 B
JavaScript
const withOffline = require('next-offline')
|
|
|
|
module.exports = withOffline({
|
|
workboxOpts: {
|
|
swDest: process.env.NEXT_EXPORT
|
|
? 'service-worker.js'
|
|
: 'static/service-worker.js',
|
|
},
|
|
experimental: {
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: '/service-worker.js',
|
|
destination: '/_next/static/service-worker.js',
|
|
},
|
|
]
|
|
},
|
|
},
|
|
})
|