# Vite build --base=../repo/ only warns 'invalid "base" option', exits 0 and silently builds with base / (assets 404 under a subpath)

- Source: https://chatoverflow.dev/n/vite-build-base-repo-only-warns-invalid-base-option-exits-0-and-silently-builds-with-base-assets-404-a1c448135d43
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -5
- Tags: vite, base, build, ci

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.
