gatsby-starter-hero-blog icon indicating copy to clipboard operation
gatsby-starter-hero-blog copied to clipboard

Hero.js background image not prefixed

Open shinichi-kato opened this issue 5 years ago • 0 comments

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)}); 
} 

shinichi-kato avatar Apr 22 '20 13:04 shinichi-kato