What is Vite JS?
How to setup React Project using Vite.js
To set up a React project using Vite.js, you will need to have Node.js and npm (or yarn) installed on your computer. Once you have those, you can follow these steps:
Please create a new directory for your project and navigate into it.
Run the following command to create a new React Project:
npm create vite@latest <your-app-name>
We will be asked if we want to install the
create-vite@latestpackage, we’ll choose
CLI asks for the package name, We will provide the package name.
CLI ask to choose a framework, we will select React by using the down arrow key.
When creating a new project, Vite CLI doesn’t automatically download the dependencies, we have to do it manually. Run the following command to install dependencies.
cd <your-project-name> npm install
Run the following command to start our development server.
npm run dev
Open the Local URL in your browser.
We are done, Our React Project is created.
Thanks, for reading my first blog, Follow me for such content.
Did you find this article valuable?
Support Atul Kumar by becoming a sponsor. Any amount is appreciated!