File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change
1
+ const { join } = require ( 'path' )
2
+ const { existsSync } = require ( 'fs' )
1
3
const { find, isUrl } = require ( '../utils' )
2
4
3
5
module . exports = function nuxtMeta ( pwa ) {
@@ -96,6 +98,13 @@ function generateMeta (pwa) {
96
98
}
97
99
}
98
100
101
+ const favicon = join ( this . options . srcDir , this . options . dir . static , 'favicon.ico' )
102
+ if ( options . favicon && ! find ( this . options . head . link , 'rel' , 'shortcut icon' ) && existsSync ( favicon ) ) {
103
+ console . warn ( 'You are using a low quality icon, use icon png. See https://pwa.nuxtjs.org/modules/icon.html' )
104
+
105
+ this . options . head . link . push ( { rel : 'shortcut icon' , href : 'favicon.ico' } )
106
+ }
107
+
99
108
// Title
100
109
if ( options . name && ! this . options . head . title && typeof this . options . head . titleTemplate !== 'function' ) {
101
110
this . options . head . title = options . name
You can’t perform that action at this time.
0 commit comments