gatsby-starter-hero-blog
gatsby-starter-hero-blog copied to clipboard
Hero.js background image not prefixed
I tried to deploy hero-blog using --prefix-paths, so I checked source and resumed blanked parameter in gatsby-config.js.
pathPrefix: config.pathPrefix
But I found background image of Hero.js is not shown on deployed site.
my workaround on Hero.js is to add import {withPrefix} from 'gatsby'; and
fix three .hero styles (.hero, @from-width tablet {.hero}, and @from-width desktop { .hero}) like this
from
.hero {
background-image: url(${backgrounds.desktop});
}
to
.hero {
background-image: url(${withPrefix(backgrounds.desktop)});
}