Only apply pathPrefix if —prefix-paths set
Only apply pathPrefix if —prefix-paths set

Currently the plugin applieds pathPrefix whenever the gatsby-config.js file has a value set for it. However this means running ‘gatsby develop’ or ‘gatsby build’ without the ‘—prefix-paths’ flag still uses it and the favicon links don’t resolve correctly.

I’ve changed it to check for ‘—prefix-paths’ and only apply the ‘pathPrefix’ value in this case. This is consistent with how offical plug-ins such as ‘gatsby-link’ behave.

Signed-off-by: Chris Boon <21125bd6fd581b48dbffbe7367b08f9fb0ea3389@gmail.com>

Creatiwity/gatsby-plugin-favicon