Skip to content

Commit 82d65e1

Browse files
committed
chore: Merge branch 'master' into dev
2 parents 7f56846 + 38234ef commit 82d65e1

File tree

7 files changed

+43
-17
lines changed

7 files changed

+43
-17
lines changed

docs/core-plugins/pwa.md

+27-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ file, or the `"vue"` field in `package.json`.
1515

1616
- **pwa.workboxPluginMode**
1717

18-
This allows you to the choose between the two modes supported by the underlying
18+
This allows you to choose between the two modes supported by the underlying
1919
[`workbox-webpack-plugin`](https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin).
2020

2121
- `'GenerateSW'` (default), will lead to a new service worker file being created
@@ -83,6 +83,30 @@ file, or the `"vue"` field in `package.json`.
8383
- start_url: `'.'`
8484
- display: `'standalone'`
8585
- theme_color: `pwa.themeColor`
86+
- icons: `[
87+
{
88+
'src': './img/icons/android-chrome-192x192.png',
89+
'sizes': '192x192',
90+
'type': 'image/png'
91+
},
92+
{
93+
'src': './img/icons/android-chrome-512x512.png',
94+
'sizes': '512x512',
95+
'type': 'image/png'
96+
},
97+
{
98+
'src': './img/icons/android-chrome-maskable-192x192.png',
99+
'sizes': '192x192',
100+
'type': 'image/png',
101+
'purpose': 'maskable'
102+
},
103+
{
104+
'src': './img/icons/android-chrome-maskable-512x512.png',
105+
'sizes': '512x512',
106+
'type': 'image/png',
107+
'purpose': 'maskable'
108+
}
109+
]`
86110

87111
- **pwa.manifestCrossorigin**
88112

@@ -106,6 +130,8 @@ file, or the `"vue"` field in `package.json`.
106130

107131
Change these values to use different paths for your icons. As of v4.3.0, you can use `null` as a value and that icon will not be included.
108132

133+
*NOTE:* These icons are only used to generate the meta tags in the `<head>` of your HTML doc. To change the icon paths for your manifest please use `pwa.manifestOptions.icons`
134+
109135
### Example Configuration
110136

111137
```js

docs/guide/css.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,17 @@ module.exports = {
133133
// pass options to sass-loader
134134
// @/ is an alias to src/
135135
// so this assumes you have a file named `src/variables.sass`
136-
// Note: this option is named as "data" in sass-loader v7
136+
// Note: this option is named as "prependData" in sass-loader v8
137137
sass: {
138-
prependData: `@import "~@/variables.sass"`
138+
additionalData: `@import "~@/variables.sass"`
139139
},
140140
// by default the `sass` option will apply to both syntaxes
141141
// because `scss` syntax is also processed by sass-loader underlyingly
142-
// but when configuring the `data` option
142+
// but when configuring the `prependData` option
143143
// `scss` syntax requires an semicolon at the end of a statement, while `sass` syntax requires none
144144
// in that case, we can target the `scss` syntax separately using the `scss` option
145145
scss: {
146-
prependData: `@import "~@/variables.scss";`
146+
additionalData: `@import "~@/variables.scss";`
147147
},
148148
// pass Less.js Options to less-loader
149149
less:{

docs/guide/deployment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ firebase deploy --only hosting
261261

262262
If you want other Firebase CLI features you use on your project to be deployed, run `firebase deploy` without the `--only` option.
263263

264-
You can now access your project on `https://<YOUR-PROJECT-ID>.firebaseapp.com`.
264+
You can now access your project on `https://<YOUR-PROJECT-ID>.firebaseapp.com` or `https://<YOUR-PROJECT-ID>.web.app`.
265265

266266
Please refer to the [Firebase Documentation](https://firebase.google.com/docs/hosting/deploying) for more details.
267267

docs/ru/guide/css.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,17 @@ module.exports = {
135135
// передача настроек в sass-loader
136136
// @/ это псевдоним к каталогу src/ поэтому предполагается,
137137
// что у вас в проекте есть файл `src/variables.scss`
138-
// Примечание: эта опция называется "data" в sass-loader v7
138+
// Примечание: эта опция называется "prependData" в sass-loader v8
139139
sass: {
140-
prependData: `@import "~@/variables.sass"`
140+
additionalData: `@import "~@/variables.sass"`
141141
},
142142
// по умолчанию опция `sass` будет применяться к обоим синтаксисам
143143
// потому что синтаксис `scss` по сути также обрабатывается sass-loader
144-
// но при настройке опции `data` синтаксис `scss` требует точку с запятой
144+
// но при настройке опции `prependData` синтаксис `scss` требует точку с запятой
145145
// в конце оператора, в то время как для `sass` точки с запятой не требуется
146146
// в этом случае синтаксис `scss` можно настроить отдельно с помощью опции `scss`
147147
scss: {
148-
prependData: `@import "~@/variables.scss";`
148+
additionalData: `@import "~@/variables.scss";`
149149
},
150150
// передача настроек Less.js в less-loader
151151
less:{

docs/zh/dev-guide/plugin-dev.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ module.exports.hooks = (api) => {
288288
const renderIndex = lines.findIndex(line => line.match(/render/))
289289
lines[renderIndex] += `${EOL} router,`
290290
291-
fs.writeFileSync(api.entryFile, line.join(EOL), { encoding: 'utf-8' })
291+
fs.writeFileSync(api.entryFile, lines.join(EOL), { encoding: 'utf-8' })
292292
})
293293
}
294294
```
@@ -301,7 +301,7 @@ Service 插件在 Service 实例被创建后自动加载 - 例如,每次 `vue-
301301

302302
一个 service 插件应该导出一个函数,这个函数接受两个参数:
303303

304-
- 一个 [PluginAPI][plugin-api] 实例
304+
- 一个 [PluginAPI][plugin-api.md] 实例
305305

306306
- 一个包含 `vue.config.js` 内指定的项目本地选项的对象,或者在 `package.json` 内的 `vue` 字段。
307307

docs/zh/guide/css.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,16 @@ module.exports = {
126126
sass: {
127127
// @/ 是 src/ 的别名
128128
// 所以这里假设你有 `src/variables.sass` 这个文件
129-
// 注意:在 sass-loader v7 中,这个选项名是 "data"
130-
prependData: `@import "~@/variables.sass"`
129+
// 注意:在 sass-loader v8 中,这个选项名是 "prependData"
130+
additionalData: `@import "~@/variables.sass"`
131131
},
132132
// 默认情况下 `sass` 选项会同时对 `sass` 和 `scss` 语法同时生效
133133
// 因为 `scss` 语法在内部也是由 sass-loader 处理的
134-
// 但是在配置 `data` 选项的时候
134+
// 但是在配置 `prependData` 选项的时候
135135
// `scss` 语法会要求语句结尾必须有分号,`sass` 则要求必须没有分号
136136
// 在这种情况下,我们可以使用 `scss` 选项,对 `scss` 语法进行单独配置
137137
scss: {
138-
prependData: `@import "~@/variables.scss";`
138+
additionalData: `@import "~@/variables.scss";`
139139
},
140140
// 给 less-loader 传递 Less.js 相关选项
141141
less:{

packages/@vue/cli-plugin-pwa/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ file, or the `"vue"` field in `package.json`.
1515

1616
- **pwa.workboxPluginMode**
1717

18-
This allows you to the choose between the two modes supported by the underlying
18+
This allows you to choose between the two modes supported by the underlying
1919
[`workbox-webpack-plugin`](https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin).
2020

2121
- `'GenerateSW'` (default), will lead to a new service worker file being created

0 commit comments

Comments
 (0)