diff --git a/lib/meta/module.js b/lib/meta/module.js index 6d305b1d..3399be4c 100755 --- a/lib/meta/module.js +++ b/lib/meta/module.js @@ -102,13 +102,15 @@ function generateMeta (pwa) { } // Icons - if (options.favicon && options.icons && options.icons.length > 0) { + if (options.icons && options.icons.length > 0) { const iconSmall = options.icons[0] const iconBig = options.icons[options.icons.length - 1] // Shortcut icon - head.link.push({ rel: 'shortcut icon', href: iconSmall.src }) - head.link.push({ rel: 'apple-touch-icon', href: iconBig.src, sizes: iconBig.sizes }) + if (options.favicon) { + head.link.push({ rel: 'shortcut icon', href: iconSmall.src }) + head.link.push({ rel: 'apple-touch-icon', href: iconBig.src, sizes: iconBig.sizes }) + } // Launch Screen Image (IOS) if (options.mobileAppIOS && pwa._iosSplash) { @@ -134,14 +136,13 @@ function generateMeta (pwa) { }) } } - } - - // Favicon.ico as fallback - const favicon = join(nuxt.options.srcDir, nuxt.options.dir.static, 'favicon.ico') - if (options.favicon && existsSync(favicon)) { - // eslint-disable-next-line no-console - console.warn('You are using a low quality icon, use icon png. See https://pwa.nuxtjs.org/icon') - head.link.push({ rel: 'shortcut icon', href: nuxt.options.router.base + 'favicon.ico' }) + } else { + // favicon.ico as fallback + // TODO: Drop support as it is harmful: https://mathiasbynens.be/notes/rel-shortcut-icon + const favicon = join(nuxt.options.srcDir, nuxt.options.dir.static, 'favicon.ico') + if (existsSync(favicon)) { + head.link.push({ rel: 'shortcut icon', href: nuxt.options.router.base + 'favicon.ico' }) + } } // Title