Steps with Vite and React-router
- Install gh-pages :
pnpm i -D gh-pages - Add scripts to package.json:
"build-for-deploy": "tsc && vite build && cp dist/index.html dist/404.html","predeploy": "yarn run build-for-deploy","deploy": "gh-pages -d dist",
- Add homepage to package.json: