Skip to content

Commit 6f9e478

Browse files
meteorlxyulivz
authored andcommittedNov 29, 2019
fix($plugin-pwa): no global-ui-component when updatePopup is disabled (#2041)
1 parent 7f2a997 commit 6f9e478

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎packages/@vuepress/plugin-pwa/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ const { logger, fs, path } = require('@vuepress/shared-utils')
33
module.exports = (options, context) => ({
44
ready () {
55
options = Object.assign({
6-
serviceWorker: true
6+
serviceWorker: true,
7+
popupComponent: 'SWUpdatePopup'
78
}, options)
89
},
910

@@ -26,7 +27,7 @@ module.exports = (options, context) => ({
2627
// { name: 'SWUpdatePopup', path: path.resolve(__dirname, 'lib/SWUpdatePopup.vue') }
2728
// ],
2829

29-
globalUIComponents: options.popupComponent || 'SWUpdatePopup',
30+
globalUIComponents: options.updatePopup ? options.popupComponent : undefined,
3031

3132
enhanceAppFiles: path.resolve(__dirname, 'lib/enhanceAppFile.js'),
3233

0 commit comments

Comments
 (0)
Please sign in to comment.