Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mikailg's avatar

Issue with paths in Vite

hi, I use laravel, vite and inertiaJS,

have some problems with paths,

on npm run dev images are displaying fine with the '/imgs/myimage.png' path (imgs folder in public)

however when I npm run build I have to specify '/public/imgs/myimage.png'

so I have to include public/ in the path too

otherwise it won't build

Please help, I want my path for dev and for build to be the same

Thanks

0 likes
0 replies

Please or to participate in this conversation.