Set up, and deploy React app for free within 10 seconds. Vite > CRA
I am tired of create-react-app, it's very slow to npm install
and npm start
.
I intent to use this as my go to React template.
npm install
- install dependenciesnpm run dev
- start dev servernpm run predeploy && npm run deploy
- deploy latest commit to github pages. No manual work is needed. Just visit the URL, it should be live!
- Fork this repo on GitHub to start a new project.
- Run
npm run fix_package_json_for_current_repo
. This fixes thehomepage
andname
keys, which are needed for GitHub pages deployment. - Add package.json and commit.
- Tip: Use
pnpm
instead ofnpm
for even faster installation time. - Deletable/starter code is marked by an underscore at the end. Folders and contents like this can be deleted without affecting Vite.
- Tailwind - added node package to project, so sorting of classes works. Install prettier (to activate sorting) and tailwind official extension (for intellisense) on vscode.
- Scss - installed node package. The tailwind vscode extension gives highlighting support for Tailwind stuff in scss files.