How to use Vite build tool In React
Step 1: Navigate to the folder where you want to create the project and open it in terminal
Step 2: In the terminal of the application directory type the following command.
npm create vite@latest <<Application_name>>
Step 3: Select the React Framework and then variant as JavaScript from options.
Step 4: Navigate to the newly created folder using the command.
cd <<Application_name>>
now, we can see the basic project structure show in below image.
Step 5: Use the below command in terminal to install all required dependencies.
npm install
OR
npm i
After successfully executing this command we can see a new folder named “node_module” in the project folder which contains all the dependencies.
Step 6: To run the application use the following command in terminal.
npm run dev
React Environment Setup
To run any React application, we need to first setup a ReactJS Development Environment. In this article, we will show you a step-by-step guide to installing and configuring a working React development environment.
We will discuss the following approaches to setup environment in React.
Table of Content
- Using create-react-app (CRA command)
- Using webpack and babel
- Using Vite build tool
Contact Us