Como instalar corretamente o Tailwind CSS no React
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
Southern Boubou
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
/* ./src/index.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
// with npm
npm install react-tailwindcss-components
// with yarn
yarn add react-tailwindcss-components
// tailwind.config.js
module.exports = {
- purge: [],
+ purge: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}
module.exports = {
content: [
"./src/**/*.{js,jsx,ts,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}