Forked from mdasifmunshe/Install Tailwind CSS with Vite and Yarn
Created
March 10, 2023 18:10
-
-
Save sferdeveloper/63f85d5dd3b0a7bcbad49acce0fe3c70 to your computer and use it in GitHub Desktop.
Setting up Tailwind CSS in a Vite project with Yarn.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Terminal */ | |
yarn create vite my-project | |
cd my-project | |
yarn add -D tailwindcss postcss autoprefixer | |
yarn tailwindcss init -p | |
/* tailwind.config.cjs */ | |
/** @type {import('tailwindcss').Config} */ | |
module.exports = { | |
content: [ | |
"./index.html", | |
"./src/**/*.{js,ts,jsx,tsx}", | |
], | |
theme: { | |
extend: {}, | |
}, | |
plugins: [], | |
} | |
/* index.css */ | |
@tailwind base; | |
@tailwind components; | |
@tailwind utilities; | |
/* Terminal */ | |
yarn dev | |
/* Enjoy */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment