We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2ac6be commit 43971d8Copy full SHA for 43971d8
packages/@vue/cli-plugin-pwa/index.js
@@ -24,15 +24,20 @@ module.exports = (api, options) => {
24
)
25
}
26
27
- const workBoxConfig = Object.assign({
28
- cacheId: name,
+ const defaultOptions = {
29
exclude: [
30
/\.map$/,
31
/img\/icons\//,
32
/favicon\.ico$/,
33
/manifest\.json$/
34
]
35
- }, userOptions.workboxOptions)
+ }
+
36
+ const defaultGenerateSWOptions = workboxPluginMode === 'GenerateSW' ? {
37
+ cacheId: name
38
+ } : {}
39
40
+ const workBoxConfig = Object.assign(defaultOptions, defaultGenerateSWOptions, userOptions.workboxOptions)
41
42
webpackConfig
43
.plugin('workbox')
0 commit comments