From 3e910ae7e87d341c6a6ea018d013105ce1721b5b Mon Sep 17 00:00:00 2001 From: DraftMan Date: Thu, 1 Oct 2020 11:16:27 +0200 Subject: [PATCH] fix(meta): add missing `router.base` prefix to favicon (#354) * Relative path missing for the favicon The favicon must be accessible from any page and it does not matter how deep the page is. The only possible solution is to use a relative url. * Update module.js Co-authored-by: pooya parsa --- lib/meta/module.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/meta/module.js b/lib/meta/module.js index 97555957..401b193b 100755 --- a/lib/meta/module.js +++ b/lib/meta/module.js @@ -111,7 +111,7 @@ function generateMeta (pwa) { if (options.favicon && !find(this.options.head.link, 'rel', 'shortcut icon') && existsSync(favicon)) { console.warn('You are using a low quality icon, use icon png. See https://pwa.nuxtjs.org/icon/') - this.options.head.link.push({ rel: 'shortcut icon', href: 'favicon.ico' }) + this.options.head.link.push({ rel: 'shortcut icon', href: this.options.router.base + 'favicon.ico' }) } // Title