✅ Node.js: ^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0 ✅ Yarn: v1.22.19
git clone https://github.com/mhrdini/vite-react-ts-template.git example
cd example
yarn
yarn dev
- Install node and npm (I used nvm)
- Remove all modern Yarn installations and install classic Yarn
- Create a Vite project with the React and Typescript template using Yarn
yarn create vite <name of repo> --template react-ts
- Go to root directory of project
cd <name of repo>
- Install and configure Prettier
- Install:
yarn add -D prettier
- Create .prettierrc and .prettierignore in root directory
- Install:
- Install and configure Eslint and its plugins
- Install:
yarn add -D eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-config-prettier eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks
- Create .eslintrc and .eslintignore in root directory
- Install:
- Install and configure TailwindCSS
- Install:
yarn add -D tailwindcss postcss autoprefixer npx tailwindcss init -p
- Setup tailwind.config.js
- Initialise src/index.css with TailwindCSS directives