2017-06-12 19:24:57 +02:00
|
|
|
const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin')
|
|
|
|
|
|
|
|
module.exports = {
|
2018-12-17 17:34:32 +01:00
|
|
|
webpack: config => {
|
2017-06-12 19:24:57 +02:00
|
|
|
config.plugins.push(
|
|
|
|
new SWPrecacheWebpackPlugin({
|
|
|
|
verbose: true,
|
|
|
|
staticFileGlobsIgnorePatterns: [/\.next\//],
|
|
|
|
runtimeCaching: [
|
|
|
|
{
|
|
|
|
handler: 'networkFirst',
|
|
|
|
urlPattern: /^https?.*/
|
|
|
|
}
|
|
|
|
]
|
|
|
|
})
|
|
|
|
)
|
|
|
|
|
|
|
|
return config
|
|
|
|
}
|
|
|
|
}
|