Vite is used to create react applications which reload way faster than the original CRA. In a case where you would be writing Sass and using Vite to bootstrap your application, you would come across an error which states "Missing Preprocessor for Sass". Do not panic. All you have to do is to install a "fix".
npm add --save-dev sass
Just copy this command and install it if you use NPM and it should work.
By the Side, Some commands for Creating React Apps\
/Vite/
Scaffoliding the React App:
npm create vite@latest
Use your keyboard and type in the required fields. When done, use your keyboard and scroll to the type of react you would be writing. Once that's done, click enter. Then it should start scaffolding the folder. Once this process is complete, you should see similar commands like the ones below. You should run the commands in the order listed.
cd "Folder Name"
npm install
npm run dev
/React/
For React, you should just type in the command below and wait a while. Once done, you should see similar commands like the ones below. Follow the instructions and you should have your react app running.
Command to Create a react app:
npx create-react-app "folder name"
cd folder name
Command to start the react app on your local computer:
npm start
Really Simple and Easy.
Top comments (0)