This template provides a minimal setup to get React working in Vite with Hot Module Replacement (HMR) and some ESLint rules.
Before you start, make sure you have the following installed:
Clone the repository to your local machine:
git clone <repository-url>
cd path/to/your/frontend/directory
Install the required dependencies using npm
:
npm install
Start the development server with Hot Module Replacement (HMR) enabled:
npm run dev
This will start the Vite server and the React app will be accessible at http://localhost:3000/
(or another port, which will be shown in the terminal).
This project uses Vite to build and serve the React application. Currently, two official plugins are available for handling React:
- @vitejs/plugin-react uses Babel for Fast Refresh.
- @vitejs/plugin-react-swc uses SWC for Fast Refresh.
Both plugins enable fast refresh in development, with SWC being a faster alternative for some setups.
- Ensure that all dependencies are installed correctly before running the development server.
- If you encounter any issues, try deleting the
node_modules
folder and runningnpm install
again.
Happy coding! 🚀