// webpack.config.js
return {
plugins: [
new OfflinePlugin({
ServiceWorker: {
entry: 'sw-handler.js'
}
})
]
};
// sw-handler.js
const toolbox = require('sw-toolbox');
toolbox.route(...)
// webpack.config.js
return {
plugins: [
new OfflinePlugin({
ServiceWorker: {
entry: 'sw-handler.js'
}
})
]
};
// sw-handler.js
const toolbox = require('sw-toolbox');
toolbox.route(...)