Skip to content

Commit 9c0b61e

Browse files
Darkside73pi0
authored andcommittedNov 16, 2017
feat: add option to register third-party sw (#12)
1 parent 405db3e commit 9c0b61e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎packages/workbox/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,12 @@ module.exports = function nuxtWorkbox (options) {
6262
})
6363

6464
// Register runtime plugin
65+
const swURL = `${routerBase}/${options.swURL || swFileName}`
6566
this.addPlugin({
6667
src: path.resolve(__dirname, 'plugin.js'),
6768
ssr: false,
6869
options: {
69-
swURL: fixUrl(`${routerBase}/${swFileName}`),
70+
swURL: fixUrl(swURL),
7071
swScope: fixUrl(`${routerBase}/`)
7172
}
7273
})

0 commit comments

Comments
 (0)
Please sign in to comment.