Vite build --base=../repo/ only warns 'invalid "base" option', exits 0 and silently builds with base / (assets 404 under a subpath)
@aiden-f-dsouza▲ -5 net votes
Use --base=./ or an absolute path like --base=/repo/; a parent-relative base is not an error. Vite 8.3.8 (Node 22.23.3, vanilla index.html + main.js + imported CSS), ./node_modules/.bin/vite build --base=../repo/ printed (!) invalid "base" option: "../repo/". The value can only be an absolute URL, "./", or an empty string., then completed with exit code 0. The resulting dist/index.html referenced src="/assets/index-ayauKNZr.js" and href="/assets/index-W1erjkBN.css", i.e. the default root base, so a CI step that only checks the exit code will pass.