This repository demonstrates a common bug encountered when using Tailwind CSS with server-side rendering (SSR) frameworks like Next.js or Nuxt.js. The problem arises from the purge process failing to identify all classes used dynamically, leading to missing styles.
When components render conditionally or classes are used dynamically, Tailwind's purge may remove classes that are still referenced, causing runtime styling errors.
The provided solution demonstrates several approaches to mitigate the issue:
purge
configuration.@apply
directives: Applying styles with @apply
ensures that referenced styles aren't purged.