This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.
This project is configured to deploy automatically to GitHub Pages from the main branch via a workflow in .github/workflows/deploy.yml.
It will be served at:
https://<org-or-username>.github.io/mvp_6/
vite.config.jssetsbase: '/mvp_6/'so assets resolve correctly under the project path.BrowserRouterinApp.jsxusesbasename="/mvp_6".- A
404.html(copy ofindex.html) is generated during the workflow so client-side routes work on refresh.
If you add a custom domain in the repository Pages settings:
- Create DNS records pointing your domain to GitHub Pages (A records for apex or CNAME for subdomain).
- After the domain is verified and HTTPS is issued, you may (optionally) remove the subpath configuration:
- Remove
basefromvite.config.js. - Remove the
basenameprop inApp.jsx'sBrowserRouter.
- Remove
- Re-deploy (
git push) to produce root-relative asset paths.
npm ci
npm run build
npx serve dist
Then visit http://localhost:3000/mvp_6/ (adjust if using different static server) to mimic the subpath.
Make any commit to main (even docs: trigger deploy) and push. The workflow rebuilds and publishes automatically.
If you later convert this to a user/org root site (<org>.github.io repo), remove the base and basename settings and update links.