I create a react project by using vite. When i run command npm run build
to build my project then dist folder is create but my images are neither showing in dist/assets nor in deploy page on github.
My previous projects build without any problen dist/assets/ folder.I have already added base in vite.config.js.
I think that my images are not including when i build my project.I want to build my project with images.Sorry, for bad english.
I were putting image source like this src/images/image.png
thats was reason why build command not adding image to dist folder. Correct way to give image source like this : ./images/image.png
.
You can also give image src by import images.
import image from "./images/image.png"