To create the app in the root folder of the repository, run the following command:
npm create vite@latest . -- --template react
To install Tailwind CSS, run the following command:
npm install -D tailwindcss postcss autoprefixer
After installing Tailwind CSS, you can proceed with the rest of the setup process.
npx tailwindcss init -p
This command generates two files tailwind.config.js, postcss.config.js
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}
@tailwind base;
@tailwind components;
@tailwind utilities;