I want to run a build of a Vite/ReactJS project without npm run preview, just by double-clicking on index.html in the build folder.
This can be done manually by replacing type=”module” in index.html with defer=”defer” and removing crossorigin and adding a dot to the paths in scr and href enter image description here
You also need to manually add a point for the paths of local images in the compiled js file
If you specify base:’./’ in the vite config, then the dots for the paths in index.html are added, but in the js file the paths to the images are indicated in a very strange way and they must again be corrected manually
enter image description here
Most likely there is some simple way, but I have been looking for a solution for quite a long time and so far there is nothing sensible