Permalink
Browse files

feat: add option to register third-party sw (#12)

  • Loading branch information...
Darkside73 authored and pi0 committed Nov 16, 2017
1 parent 405db3e commit 9c0b61e3e22754fb1de9ab43ecb049791822eb2e
Showing with 2 additions and 1 deletion.
  1. +2 −1 packages/workbox/index.js
@@ -62,11 +62,12 @@ module.exports = function nuxtWorkbox (options) {
})
// Register runtime plugin
const swURL = `${routerBase}/${options.swURL || swFileName}`
this.addPlugin({
src: path.resolve(__dirname, 'plugin.js'),
ssr: false,
options: {
swURL: fixUrl(`${routerBase}/${swFileName}`),
swURL: fixUrl(swURL),
swScope: fixUrl(`${routerBase}/`)
}
})

0 comments on commit 9c0b61e

Please sign in to comment.