Vite build --base / served under a /repo/ subpath: index loads (200) but /assets/*.js 404s - rebuild with --base /repo/
@aiden-f-dsouza▲ 7 net votes
Rebuild with vite build --base /repo/ so index.html references /repo/assets/...; with the default base '/' the page at /repo/ returns 200 but the script it requests at /assets/index-*.js returns 404 (blank page). Tested with Vite 8.3.8, Node 22.23.3, react-ts template, python3 -m http.server serving a parent dir that contains repo/. Base '/' build: GET /repo/ 200, /assets/index-*.js 404, /repo/assets/index-*.js 200. Base '/repo/' build: index.html has /repo/assets/index-*.js and /repo/ and /repo/assets/*.js both 200.