File tree 2 files changed +9
-0
lines changed
packages/@vue/cli-plugin-pwa
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ file, or the `"vue"` field in `package.json`.
96
96
97
97
``` js
98
98
{
99
+ faviconSVG: ' img/icons/favicon.svg' ,
99
100
favicon32: ' img/icons/favicon-32x32.png' ,
100
101
favicon16: ' img/icons/favicon-16x16.png' ,
101
102
appleTouchIcon: ' img/icons/apple-touch-icon-152x152.png' ,
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ const defaultManifest = {
45
45
}
46
46
47
47
const defaultIconPaths = {
48
+ faviconSVG : 'img/icons/favicon.svg' ,
48
49
favicon32 : 'img/icons/favicon-32x32.png' ,
49
50
favicon16 : 'img/icons/favicon-16x16.png' ,
50
51
appleTouchIcon : 'img/icons/apple-touch-icon-152x152.png' ,
@@ -84,6 +85,13 @@ module.exports = class HtmlPwaPlugin {
84
85
const assetsVersionStr = assetsVersion ? `?v=${ assetsVersion } ` : ''
85
86
86
87
// Favicons
88
+ if ( iconPaths . faviconSVG != null ) {
89
+ data . headTags . push ( makeTag ( 'link' , {
90
+ rel : 'icon' ,
91
+ type : 'image/svg+xml' ,
92
+ href : getTagHref ( publicPath , iconPaths . faviconSVG , assetsVersionStr )
93
+ } ) )
94
+ }
87
95
if ( iconPaths . favicon32 != null ) {
88
96
data . headTags . push ( makeTag ( 'link' , {
89
97
rel : 'icon' ,
You can’t perform that action at this time.
0 commit comments