fix($plugin-pwa): no global-ui-component when updatePopup is disabled (#2041)

This commit is contained in:
meteorlxy
2019-11-29 10:56:26 +08:00
committed by ULIVZ
parent 7f2a99754f
commit 6f9e478eff
+3 -2
View File
@@ -3,7 +3,8 @@ const { logger, fs, path } = require('@vuepress/shared-utils')
module.exports = (options, context) => ({
ready () {
options = Object.assign({
serviceWorker: true
serviceWorker: true,
popupComponent: 'SWUpdatePopup'
}, options)
},
@@ -26,7 +27,7 @@ module.exports = (options, context) => ({
// { name: 'SWUpdatePopup', path: path.resolve(__dirname, 'lib/SWUpdatePopup.vue') }
// ],
globalUIComponents: options.popupComponent || 'SWUpdatePopup',
globalUIComponents: options.updatePopup ? options.popupComponent : undefined,
enhanceAppFiles: path.resolve(__dirname, 'lib/enhanceAppFile.js'),