#Missing page background images in Vite 4.3.5 + plugin-vue 4.2.3 (Vue 3).

1 messages · Page 1 of 1 (latest)

bitter dragon
#

I can't seem to make heads or tails of this. I have an image in the /public folder, so in the stylesheet it's just at the root:

body {
background: url('durham.jpg') center center no-repeat;
background-size: 100vw;
}

src/public/durham.jpg

But it doesn't show up on the build site live, for example https://evilgeniuscreative.com/demo_ncdot/ or https://stackblitz.com/edit/vitejs-vite-yw4aw7

Any ideas, friends?

Next generation frontend tooling. It's fast!

toxic bough
#

I don't know, but the image is visible in your stackblitz repro.

bitter dragon
#

@toxic bough I think that's because it's running in dev mode and not a built mode. I'm pretty sure this has something to do with their using aliases for image paths in public/ or assets/. Maybe I'll just try putting it in /src and see if it works there.

toxic bough
#

Like last try, change path with ./public/[filename].[ext]

bitter dragon
#

Thanks anyway for the suggestion

#

s

bitter dragon
#

right now I feel like I'm arguing with them about whether I actually see what's actually happening or not which is kind of annoying

bitter dragon
broken ibex
bitter dragon
#

Thank you @broken ibex I will try that out.