Skip to content

Commit

Permalink
fix($plugin-pwa): no global-ui-component when updatePopup is disabled (
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy authored and ulivz committed Nov 29, 2019
1 parent 7f2a997 commit 6f9e478
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/@vuepress/plugin-pwa/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},

Expand All @@ -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'),

Expand Down

0 comments on commit 6f9e478

Please sign in to comment.