Skip to content

Commit

Permalink
fix(meta): add missing router.base prefix to favicon (#354)
Browse files Browse the repository at this point in the history
* 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 <pyapar@gmail.com>
  • Loading branch information
DraftProducts and pi0 authored Oct 1, 2020
1 parent 8e05861 commit 3e910ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/meta/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3e910ae

Please sign in to comment.