I recently found out that create-react-app was no longer being supported which forced me to try other methods of creating a react app. I was so disappointed when I came to learn of the use of Vite because of how easy and fast it was to create a react app. Another of it's pros is that it's not a react-specific tool so you have the flexibility and can use it in creating other frameworks like Vue.
- To start using vite, you navigate to your project directory, and run this:
npm create vite@latest
- Choose the project name which will also be the project's folder name.
- Choose a framework, then select your preferred variant whereby you can optionally add swc.
- Navigate to the project folder and cd into it.
cd vitetest
- Run the project
npm run
- Install the dependencies by running
npm install
- Run the app using
npm run dev
and voila, your app should be running on port http:/localhost/5173.
Top comments (0)