docs(pwa): update options

This commit is contained in:
Evan You
2018-04-25 15:34:25 -04:00
parent 36f954bfc9
commit 1177cf0b41

View File

@@ -29,6 +29,30 @@ file, or the `"vue"` field in `package.json`.
[`GenerateSW`](https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin#full_generatesw_config)
or for [`InjectManifest`](https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin#full_injectmanifest_config).
- **pwa.name**
- Default: "name" field in `package.json`
Used as the value for the `apple-mobile-web-app-title` meta tag in the generated HTML. Note you will need to edit `public/manifest.json` to match this.
- **pwa.themeColor**
- Default: `'#4DBA87'`
- **pwa.msTileColor**
- Default: `'#000000'`
- **pwa.appleMobileWebAppCapable**
- Default: `'no'`
This defaults to `'no'` because iOS before 11.3 does not have proper PWA support. See [this article](https://medium.com/@firt/dont-use-ios-web-app-meta-tag-irresponsibly-in-your-progressive-web-apps-85d70f4438cb) for more details.
- **pwa.appleMobileWebAppStatusBarStyle**
- Default: `'default'`
### Example Configuration
```js
@@ -36,9 +60,13 @@ file, or the `"vue"` field in `package.json`.
module.exports = {
// ...other vue-cli plugin options...
pwa: {
name: 'My App', // used for apple-mobile-web-app-title
name: 'My App',
themeColor: '#4DBA87',
msTileColor: '#000000',
appleMobileWebAppCapable: 'yes',
appleMobileWebAppStatusBarStyle: 'black',
// configure the workbox plugin
workboxPluginMode: 'InjectManifest',
workboxOptions: {
// swSrc is required in InjectManifest mode.