@404busters/nuxt-generate-workbox 中文文档教程
Nuxt.js Workbox generate module
This only for those nuxt.js to generate static site
License
BSD 3 Clause License
Usage
在nuxt.config.js中添加这些
module.exports = {
// other config is skipped
modules: ['@404busters/nuxt-generate-workbox'],
workbox: {
plugin: {
enabled: true,
},
generate: {
file: 'sw.js',
cacheId: 'workbox-cache',
offlineGoogleAnalytics: true, // default false
},
},
}
Nuxt.js Workbox generate module
Nuxt.js module for generate workbox service worker.
This is only for those use nuxt.js to generate static site
License
BSD 3 Clause License
Usage
Add these in nuxt.config.js
module.exports = {
// other config is skipped
modules: ['@404busters/nuxt-generate-workbox'],
workbox: {
plugin: {
enabled: true,
},
generate: {
file: 'sw.js',
cacheId: 'workbox-cache',
offlineGoogleAnalytics: true, // default false
},
},
}