Next.js needs to be Re-Built for Tailwind CSS changes to take Effect
Unanswered
Captain_Ranger posted this in #help-forum
I am applying certain style changes to my code (e.g., giving an element
This doesn't seem to affect styles already present in the file though. If I already have
Wonder if anyone has any input on why this could be happening.
What I have tried?
- Re-install Tailwind
- Create a new Next.js Project (where Tailwind changes are applied as expected)
- I tried everything on this: https://dev.to/plainsailing/tailwind-css-not-working-its-probably-this-9m4
bg- colour) but need to rebuild Next.js (delete node_modules and .next folders) for them to take place. This doesn't seem to affect styles already present in the file though. If I already have
bg-pink-500 in the file prior, if I style another element with the same colour, the style gets applied. However, if the style hasn't been applied in the file before, that is when I need to re-build.Wonder if anyone has any input on why this could be happening.
What I have tried?
- Re-install Tailwind
- Create a new Next.js Project (where Tailwind changes are applied as expected)
- I tried everything on this: https://dev.to/plainsailing/tailwind-css-not-working-its-probably-this-9m4