For project pages, Vite needs the correct base path that matches the repository name. Without it, assets load from the wrong URL and the app appears broken.
Platform: Vite + GitHub Pages
Error: 404 after deploy
For project pages, Vite needs the correct base path that matches the repository name. Without it, assets load from the wrong URL and the app appears broken.
// vite.config.js
import { defineConfig } from "vite";
export default defineConfig({
base: "/your-repo-name/"
});
Do not set base to / for project pages unless the site is served from the root domain.
Send the deploy log, repository link, target platform, and expected URL. ShipFast Deploy Rescue is a fixed-price debugging service for indie projects and MVPs.