This repository demonstrates an uncommon issue encountered while using Tailwind CSS's purge feature. The purge option, intended to remove unused CSS classes, unexpectedly caused several styles to be missing from the final build, even though all classes were correctly referenced in the project's HTML and JSX files. This bug report outlines the problem, provides a minimal reproducible example, and offers a solution.
Problem:
The purge
configuration in the tailwind.config.js
file resulted in missing styles in the final CSS output. This error was subtle and difficult to debug, as the referenced classes and files appeared correct.
Solution:
The solution involved carefully reviewing file paths and configurations to ensure that the purge option correctly targets the HTML and JSX files where the styles are used. A more detailed explanation and solution are provided in bugSolution.js
.
Steps to Reproduce:
npm install
bugSolution.js
to observe the solution.