This should work.
module.exports = {
content: [
"./resources/**/*.blade.php",
"./resources/**/*.js",
"./resources/**/*.vue",
],
theme: {
extend: {},
},
plugins: [],
}
I have no problem for styling blade components.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I installed tailwindCSS on my Laravel 9.5 project, everything is working fine except my Laravel components not applied to styles. I tried to add component directory in my tailwind.config.js, but still not working.
"./resources/**/*.blade.php",
"./resources/**/components/*.blade.php", // I added this line to fix it!
"./resources/**/*.js",
"./resources/**/*.vue",
anyone know the problem and how to fix it?
@Abdifatah tailwind purges unused styles. To keep then anyways, you need to write a safe list (regex for instance)
https://tailwindcss.com/docs/content-configuration#safelisting-classes
Please or to participate in this conversation.