- 👉 Install React with Vite in "root" folder
npm create vite@latest . -- --template react
- 👉 Install React with Vite in "vite-react" folder
npm create vite@latest vite-react -- --template react
- 👉 Install Tailwind CSS
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
- 👉 Modify the "tailwind.config.js" file to include the "purge" property
/** @type {import('tailwindcss').Config} */
export default {
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
theme: {
extend: {},
},
plugins: [],
};
- 👉 Modify the "index.css" file in src Folder
@tailwind base;
@tailwind components;
@tailwind utilities;
- 👉 Run the "vite" server
npm run dev