I installed tailwindcss via scoop and created a new project.
Then i ran via CLI tailwindcss init
and edited tailwind.config.cjs:
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./*.{html}",
],
theme: {
extend: {},
},
plugins: [],
}
I created input.css:
@tailwind base;
@tailwind components;
@tailwind utilites;
Then created output.css and started the next command:
tailwindcss -i ./assets/css/input.css -o ./assets/css/output.css --watch
Every time i edit html.css tailwind css start rebuilding but doens't create the classes i wrote in html file.
How con i solve this?
Thank you
I tried to see some answers here on stackoverflow and but i didn't find any solution to my problem.
My content section was wrong in the tailwind.config.js file.
One thing I did was change " to ' (I don't think this was the issue but I did change this). The other thing was to make sure the locations for my files were correct. For example I have an index.html file inside my public folder so this is located at
'./public/index.html'
and then my other files were in a folder,'./public/pages/**/*/.{html,js}'
but you can also do'././public/pages/**/*/js'
if you just need js files.