@@ -19,10 +19,10 @@ file, or the `"vue"` field in `package.json`.
19
19
[ ` workbox-webpack-plugin ` ] ( https://developer.chrome.com/docs/workbox/modules/workbox-webpack-plugin/ ) .
20
20
21
21
- ` 'GenerateSW' ` (default), will lead to a new service worker file being created
22
- each time you rebuild your web app.
22
+ each time you rebuild your web app.
23
23
24
24
- ` 'InjectManifest' ` allows you to start with an existing service worker file,
25
- and creates a copy of that file with a "precache manifest" injected into it.
25
+ and creates a copy of that file with a "precache manifest" injected into it.
26
26
27
27
The "[ Which Plugin to Use?] ( https://developer.chrome.com/docs/workbox/modules/workbox-webpack-plugin/#which-plugin-to-use ) "
28
28
guide can help you choose between the two modes.
@@ -78,11 +78,42 @@ file, or the `"vue"` field in `package.json`.
78
78
The object will be used to generate the ` manifest.json `
79
79
80
80
If the following attributes are not defined in the object, the options of ` pwa ` or default options will be used instead.
81
- - name: ` pwa.name `
82
- - short_name: ` pwa.name `
83
- - start_url: ` '.' `
84
- - display: ` 'standalone' `
85
- - theme_color: ` pwa.themeColor `
81
+ - name: ` pwa.name `
82
+ - short_name: ` pwa.name `
83
+ - start_url: ` '.' `
84
+ - display: ` 'standalone' `
85
+ - theme_color: ` pwa.themeColor `
86
+ - background_color: ` #000000 `
87
+ - icon:
88
+
89
+ - Defaults:
90
+
91
+ ``` js
92
+ [
93
+ {
94
+ src: " ./img/icons/android-chrome-192x192.png" ,
95
+ sizes: " 192x192" ,
96
+ type: " image/png" ,
97
+ },
98
+ {
99
+ src: " ./img/icons/android-chrome-512x512.png" ,
100
+ sizes: " 512x512" ,
101
+ type: " image/png" ,
102
+ },
103
+ {
104
+ src: " ./img/icons/android-chrome-maskable-192x192.png" ,
105
+ sizes: " 192x192" ,
106
+ type: " image/png" ,
107
+ purpose: " maskable" ,
108
+ },
109
+ {
110
+ src: " ./img/icons/android-chrome-maskable-512x512.png" ,
111
+ sizes: " 512x512" ,
112
+ type: " image/png" ,
113
+ purpose: " maskable" ,
114
+ },
115
+ ];
116
+ ```
86
117
87
118
- ** pwa .manifestCrossorigin **
88
119
0 commit comments