This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Step 1: npm create vite@latest
Step 2: npm install
Step 3: npm install - D tailwind postcss autoprefixer
Step 4: npm tailwind init -p
Step 5: Add content in the tailwind config.js
Step 6: Add required tailwind imports to index css
Step 7: Type "npm run dev" to the terminal to run the program
How to setup page using react
- npm install gh-pages --save-dev
- Add homepage in the vite.config (the link of your website)
- Add Scripts "predeploy" and deploy
"predeploy": "npm run build",
"deploy": "gh-pages -d dist", - run in the terminal "npm run deploy"