@@ -102,13 +102,15 @@ function generateMeta (pwa) {
102
102
}
103
103
104
104
// Icons
105
- if ( options . favicon && options . icons && options . icons . length > 0 ) {
105
+ if ( options . icons && options . icons . length > 0 ) {
106
106
const iconSmall = options . icons [ 0 ]
107
107
const iconBig = options . icons [ options . icons . length - 1 ]
108
108
109
109
// Shortcut icon
110
- head . link . push ( { rel : 'shortcut icon' , href : iconSmall . src } )
111
- head . link . push ( { rel : 'apple-touch-icon' , href : iconBig . src , sizes : iconBig . sizes } )
110
+ if ( options . favicon ) {
111
+ head . link . push ( { rel : 'shortcut icon' , href : iconSmall . src } )
112
+ head . link . push ( { rel : 'apple-touch-icon' , href : iconBig . src , sizes : iconBig . sizes } )
113
+ }
112
114
113
115
// Launch Screen Image (IOS)
114
116
if ( options . mobileAppIOS && pwa . _iosSplash ) {
@@ -134,14 +136,13 @@ function generateMeta (pwa) {
134
136
} )
135
137
}
136
138
}
137
- }
138
-
139
- // Favicon.ico as fallback
140
- const favicon = join ( nuxt . options . srcDir , nuxt . options . dir . static , 'favicon.ico' )
141
- if ( options . favicon && existsSync ( favicon ) ) {
142
- // eslint-disable-next-line no-console
143
- console . warn ( 'You are using a low quality icon, use icon png. See https://pwa.nuxtjs.org/icon' )
144
- head . link . push ( { rel : 'shortcut icon' , href : nuxt . options . router . base + 'favicon.ico' } )
139
+ } else {
140
+ // favicon.ico as fallback
141
+ // TODO: Drop support as it is harmful: https://mathiasbynens.be/notes/rel-shortcut-icon
142
+ const favicon = join ( nuxt . options . srcDir , nuxt . options . dir . static , 'favicon.ico' )
143
+ if ( existsSync ( favicon ) ) {
144
+ head . link . push ( { rel : 'shortcut icon' , href : nuxt . options . router . base + 'favicon.ico' } )
145
+ }
145
146
}
146
147
147
148
// Title
0 commit comments