GitHub Pages is serving your development index.html, which points to /src/main.tsx. In production, that file does not exist; Vite replaces it with compiled assets in dist/assets/.... That’s why you are seeing the 404 error for .../src/main.tsx.