Skip to content
This repository was archived by the owner on Oct 13, 2026. It is now read-only.

Commit 9c0b61e

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

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎packages/workbox/index.js‎

Lines changed: 2 additions & 1 deletion
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)