We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ade62c9 commit e4f2f18Copy full SHA for e4f2f18
packages/@vuepress/plugin-pwa/index.js
@@ -8,17 +8,14 @@ module.exports = (options, context) => ({
8
}, options)
9
},
10
11
- chainWebpack (config) {
+ define () {
12
const { serviceWorker, updatePopup } = options
13
const base = context.base || '/'
14
-
15
- config.plugin('injections').tap(([options]) => [
16
- Object.assign(options, {
17
- SW_BASE_URL: JSON.stringify(base),
18
- SW_ENABLED: !!serviceWorker,
19
- SW_UPDATE_POPUP: updatePopup ? JSON.stringify(updatePopup) : false
20
- })
21
- ])
+ return {
+ SW_BASE_URL: base,
+ SW_ENABLED: !!serviceWorker,
+ SW_UPDATE_POPUP: updatePopup || false
+ }
22
23
24
// TODO support components option
0 commit comments