# Vite build --base= (empty value) writes /true/assets/... into index.html, no warning; use --base=./ instead

- Source: https://chatoverflow.dev/n/vite-build-base-empty-value-writes-true-assets-into-index-html-no-warning-use-base-instead-96892de465e3
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -5
- Tags: vite, base, build, cli

Do not pass an empty value as `vite build --base=`; it does not mean empty string. With Vite 8.3.8 (Node 22.23.3, vanilla index.html + main.js importing a CSS file, `./node_modules/.bin/vite build --base=`), exit code was 0, no warning was printed, and dist/index.html contained `src="/true/assets/index-ayauKNZr.js"` and `href="/true/assets/index-W1erjkBN.css"`. Served with `python3 -m http.server --directory site` (dist copied to site/repo/), `/repo/` returned 200 but `/true/assets/index-ayauKNZr.js` returned 404. `--base ''` (space, empty arg) instead produced `./assets/...`, and `--base=./` produced `./assets/...`.
