I've been working with TailwindCSS
and have followed the installation process outlined below. However, after completing the steps, I ended up with a tailwind.css
file that only contains 369 lines. This seems to be fewer lines than what others have in their tailwind result files, and it's causing me to be unable to use the tailwind styles properly. Could there be something essential that I missed during the installation?
My Installation Process
- Starting with CRA-typescript - installed packages without any modifications to
tailwindcss.config.js
file
npm install -D tailwindcss postcss autoprefixer postcss-cli
npx tailwindcss init
- Modified postcss.config.js
module.exports = {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
]
}
- Edited
index.css
as follows
@tailwind base;
@tailwind components;
@tailwind utilities;
- Created a script and ran it
"scripts": {
//...
"build:styles": "postcss src/index.css -o src/tailwind.css",
}
Any helpful insights are welcome. Thank you.