From 652f4c7f3eaf896f7023b2d86db180004ab2dba1 Mon Sep 17 00:00:00 2001 From: Drew Bragg Date: Wed, 6 May 2020 00:01:58 -0400 Subject: [PATCH 1/8] docs: explain pwa head/manifest icons (#5408) --- docs/core-plugins/pwa.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/core-plugins/pwa.md b/docs/core-plugins/pwa.md index ae72a941b..50c75dcb0 100644 --- a/docs/core-plugins/pwa.md +++ b/docs/core-plugins/pwa.md @@ -83,6 +83,30 @@ file, or the `"vue"` field in `package.json`. - start_url: `'.'` - display: `'standalone'` - theme_color: `pwa.themeColor` + - icons: `[ + { + 'src': './img/icons/android-chrome-192x192.png', + 'sizes': '192x192', + 'type': 'image/png' + }, + { + 'src': './img/icons/android-chrome-512x512.png', + 'sizes': '512x512', + 'type': 'image/png' + }, + { + 'src': './img/icons/android-chrome-maskable-192x192.png', + 'sizes': '192x192', + 'type': 'image/png', + 'purpose': 'maskable' + }, + { + 'src': './img/icons/android-chrome-maskable-512x512.png', + 'sizes': '512x512', + 'type': 'image/png', + 'purpose': 'maskable' + } + ]` - **pwa.manifestCrossorigin** @@ -106,6 +130,8 @@ file, or the `"vue"` field in `package.json`. 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. + *NOTE:* These icons are only used to generate the meta tags in the `` of your HTML doc. To change the icon paths for your manifest please use `pwa.manifestOptions.icons` + ### Example Configuration ```js From 49bf36fcea35aa9401951387a3f730d04046635d Mon Sep 17 00:00:00 2001 From: FM <707885370@qq.com> Date: Tue, 7 Jul 2020 20:31:25 +0800 Subject: [PATCH 2/8] docs(zh): fix the link to the plugin-api page (#5658) [ci skip] --- docs/zh/dev-guide/plugin-dev.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/dev-guide/plugin-dev.md b/docs/zh/dev-guide/plugin-dev.md index c7459eb28..b7fa0cb86 100644 --- a/docs/zh/dev-guide/plugin-dev.md +++ b/docs/zh/dev-guide/plugin-dev.md @@ -301,7 +301,7 @@ Service 插件在 Service 实例被创建后自动加载 - 例如,每次 `vue- 一个 service 插件应该导出一个函数,这个函数接受两个参数: -- 一个 [PluginAPI][plugin-api] 实例 +- 一个 [PluginAPI][plugin-api.md] 实例 - 一个包含 `vue.config.js` 内指定的项目本地选项的对象,或者在 `package.json` 内的 `vue` 字段。 From a21c19b1d8ecf621a4b8c9759ad1a870e9016a9a Mon Sep 17 00:00:00 2001 From: Dave Dane Pacilan Date: Thu, 9 Jul 2020 21:13:34 +0800 Subject: [PATCH 3/8] docs: Update Firebase project link (#5664) [ci skip] --- docs/guide/deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/deployment.md b/docs/guide/deployment.md index bb0bec72e..2dbd89dc5 100644 --- a/docs/guide/deployment.md +++ b/docs/guide/deployment.md @@ -261,7 +261,7 @@ firebase deploy --only hosting If you want other Firebase CLI features you use on your project to be deployed, run `firebase deploy` without the `--only` option. -You can now access your project on `https://.firebaseapp.com`. +You can now access your project on `https://.firebaseapp.com` or `https://.web.app`. Please refer to the [Firebase Documentation](https://firebase.google.com/docs/hosting/deploying) for more details. From d1a42488b36d662b133e5941555109a4b3ee89ec Mon Sep 17 00:00:00 2001 From: good luck <1204505056@qq.com> Date: Fri, 10 Jul 2020 10:06:35 +0800 Subject: [PATCH 4/8] docs(zh): `additionalData` example for sass-loader 9.0 (#5668) --- docs/zh/guide/css.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/zh/guide/css.md b/docs/zh/guide/css.md index 7c5f286bb..687f5100f 100644 --- a/docs/zh/guide/css.md +++ b/docs/zh/guide/css.md @@ -135,7 +135,20 @@ module.exports = { // `scss` 语法会要求语句结尾必须有分号,`sass` 则要求必须没有分号 // 在这种情况下,我们可以使用 `scss` 选项,对 `scss` 语法进行单独配置 scss: { - prependData: `@import "~@/variables.scss";` + // sass-loader v8语法 + // prependData: `@import "~@/variables.scss";` + // sass-loader v9语法 + additionalData(content, loaderContext) { + const { resourcePath, rootContext } = loaderContext; + const relativePath = path.relative(rootContext, resourcePath); + if ( + relativePath.replace(/\\/g, "/") !== "src/styles/variables.scss" + ) { + return '@import "~@/styles/variables.scss";' + content; + } + return content; + }, + }, // 给 less-loader 传递 Less.js 相关选项 less:{ From e5cf1a2e376635d79a1a465ff610436adbb2418a Mon Sep 17 00:00:00 2001 From: vimvinter Date: Sat, 11 Jul 2020 12:31:43 +0800 Subject: [PATCH 5/8] docs(zh): change line to lines in plugin-dev.md (#5671) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: zhouxinyong[周新勇] --- docs/zh/dev-guide/plugin-dev.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/dev-guide/plugin-dev.md b/docs/zh/dev-guide/plugin-dev.md index b7fa0cb86..da705390d 100644 --- a/docs/zh/dev-guide/plugin-dev.md +++ b/docs/zh/dev-guide/plugin-dev.md @@ -288,7 +288,7 @@ module.exports.hooks = (api) => { const renderIndex = lines.findIndex(line => line.match(/render/)) lines[renderIndex] += `${EOL} router,` - fs.writeFileSync(api.entryFile, line.join(EOL), { encoding: 'utf-8' }) + fs.writeFileSync(api.entryFile, lines.join(EOL), { encoding: 'utf-8' }) }) } ``` From b722271733c6f699da10c2a458b74730abebb91e Mon Sep 17 00:00:00 2001 From: Ivan Sieder <35377072+ivansieder@users.noreply.github.com> Date: Mon, 13 Jul 2020 08:47:34 +0200 Subject: [PATCH 6/8] docs: fixed typo (#5667) [ci skip] --- docs/core-plugins/pwa.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core-plugins/pwa.md b/docs/core-plugins/pwa.md index 50c75dcb0..af16fbb17 100644 --- a/docs/core-plugins/pwa.md +++ b/docs/core-plugins/pwa.md @@ -15,7 +15,7 @@ file, or the `"vue"` field in `package.json`. - **pwa.workboxPluginMode** - This allows you to the choose between the two modes supported by the underlying + This allows you to choose between the two modes supported by the underlying [`workbox-webpack-plugin`](https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin). - `'GenerateSW'` (default), will lead to a new service worker file being created From 256e136a7544ca2c4d8c03721c0b1659fee80f75 Mon Sep 17 00:00:00 2001 From: Ivan Sieder <35377072+ivansieder@users.noreply.github.com> Date: Mon, 13 Jul 2020 08:51:13 +0200 Subject: [PATCH 7/8] docs: corrected typo in pwa readme (#5676) [ci skip] --- packages/@vue/cli-plugin-pwa/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@vue/cli-plugin-pwa/README.md b/packages/@vue/cli-plugin-pwa/README.md index ae72a941b..4457c4357 100644 --- a/packages/@vue/cli-plugin-pwa/README.md +++ b/packages/@vue/cli-plugin-pwa/README.md @@ -15,7 +15,7 @@ file, or the `"vue"` field in `package.json`. - **pwa.workboxPluginMode** - This allows you to the choose between the two modes supported by the underlying + This allows you to choose between the two modes supported by the underlying [`workbox-webpack-plugin`](https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin). - `'GenerateSW'` (default), will lead to a new service worker file being created From 38234ef74cfda729399502dea8d70917bd418355 Mon Sep 17 00:00:00 2001 From: Yazhe Wang Date: Mon, 13 Jul 2020 16:21:07 +0800 Subject: [PATCH 8/8] docs: additionalData option for sass-loader 9.0 (#5673) [ci skip] --- docs/guide/css.md | 8 ++++---- docs/ru/guide/css.md | 8 ++++---- docs/zh/guide/css.md | 21 ++++----------------- 3 files changed, 12 insertions(+), 25 deletions(-) diff --git a/docs/guide/css.md b/docs/guide/css.md index 638633c34..725341e52 100644 --- a/docs/guide/css.md +++ b/docs/guide/css.md @@ -133,17 +133,17 @@ module.exports = { // pass options to sass-loader // @/ is an alias to src/ // so this assumes you have a file named `src/variables.sass` - // Note: this option is named as "data" in sass-loader v7 + // Note: this option is named as "prependData" in sass-loader v8 sass: { - prependData: `@import "~@/variables.sass"` + additionalData: `@import "~@/variables.sass"` }, // by default the `sass` option will apply to both syntaxes // because `scss` syntax is also processed by sass-loader underlyingly - // but when configuring the `data` option + // but when configuring the `prependData` option // `scss` syntax requires an semicolon at the end of a statement, while `sass` syntax requires none // in that case, we can target the `scss` syntax separately using the `scss` option scss: { - prependData: `@import "~@/variables.scss";` + additionalData: `@import "~@/variables.scss";` }, // pass Less.js Options to less-loader less:{ diff --git a/docs/ru/guide/css.md b/docs/ru/guide/css.md index 1e667dda2..5e38485a9 100644 --- a/docs/ru/guide/css.md +++ b/docs/ru/guide/css.md @@ -135,17 +135,17 @@ module.exports = { // передача настроек в sass-loader // @/ это псевдоним к каталогу src/ поэтому предполагается, // что у вас в проекте есть файл `src/variables.scss` - // Примечание: эта опция называется "data" в sass-loader v7 + // Примечание: эта опция называется "prependData" в sass-loader v8 sass: { - prependData: `@import "~@/variables.sass"` + additionalData: `@import "~@/variables.sass"` }, // по умолчанию опция `sass` будет применяться к обоим синтаксисам // потому что синтаксис `scss` по сути также обрабатывается sass-loader - // но при настройке опции `data` синтаксис `scss` требует точку с запятой + // но при настройке опции `prependData` синтаксис `scss` требует точку с запятой // в конце оператора, в то время как для `sass` точки с запятой не требуется // в этом случае синтаксис `scss` можно настроить отдельно с помощью опции `scss` scss: { - prependData: `@import "~@/variables.scss";` + additionalData: `@import "~@/variables.scss";` }, // передача настроек Less.js в less-loader less:{ diff --git a/docs/zh/guide/css.md b/docs/zh/guide/css.md index 687f5100f..b554cdb00 100644 --- a/docs/zh/guide/css.md +++ b/docs/zh/guide/css.md @@ -126,29 +126,16 @@ module.exports = { sass: { // @/ 是 src/ 的别名 // 所以这里假设你有 `src/variables.sass` 这个文件 - // 注意:在 sass-loader v7 中,这个选项名是 "data" - prependData: `@import "~@/variables.sass"` + // 注意:在 sass-loader v8 中,这个选项名是 "prependData" + additionalData: `@import "~@/variables.sass"` }, // 默认情况下 `sass` 选项会同时对 `sass` 和 `scss` 语法同时生效 // 因为 `scss` 语法在内部也是由 sass-loader 处理的 - // 但是在配置 `data` 选项的时候 + // 但是在配置 `prependData` 选项的时候 // `scss` 语法会要求语句结尾必须有分号,`sass` 则要求必须没有分号 // 在这种情况下,我们可以使用 `scss` 选项,对 `scss` 语法进行单独配置 scss: { - // sass-loader v8语法 - // prependData: `@import "~@/variables.scss";` - // sass-loader v9语法 - additionalData(content, loaderContext) { - const { resourcePath, rootContext } = loaderContext; - const relativePath = path.relative(rootContext, resourcePath); - if ( - relativePath.replace(/\\/g, "/") !== "src/styles/variables.scss" - ) { - return '@import "~@/styles/variables.scss";' + content; - } - return content; - }, - + additionalData: `@import "~@/variables.scss";` }, // 给 less-loader 传递 Less.js 相关选项 less:{