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
git clone *project link*
npm install
Check if these dependencies are present (just run the commands):
npm install react react-dom
npm install -D eslint prettier
npm install -D eslint-plugin-jsx-a11y
.env setup:
cp .env.example .env
And in newly created .env file change the VITE_API_URL=https://api.example.com
to desired API URL.
npm run dev
IMPORTANT: Before every commit run these commands first to ensure readability of the code and check for possible warnings
npm run lint
npm run format
npm run dev
: Start development server.
npm run build
: Build for production.
npm run preview
: Preview production build.
npm run lint
: Lint the codebase.
npm run format
: Format the codebase.