Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Hero.js background image not prefixed #107

Open
shinichi-kato opened this issue Apr 22, 2020 · 0 comments
Open

Hero.js background image not prefixed #107

shinichi-kato opened this issue Apr 22, 2020 · 0 comments

Comments

@shinichi-kato
Copy link

shinichi-kato commented Apr 22, 2020

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)}); 
} 
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant