This repository demonstrates a bug where Tailwind CSS classes fail to render in a React application after upgrading to a newer version of Tailwind CSS. The issue is specifically related to the application not updating after modifications of the CSS classes.
After upgrading Tailwind CSS and modifying or adding CSS classes to components in a React application, the application does not reflect those changes after the development server restart. The classes remain unresponsive even after clearing the cache. This issue could be related to how Tailwind processes the CSS and how the build process handles the update. This example demonstrates the bug in a simple counter application.
To reproduce the problem, clone this repository and run:
npm install
npm start
You can then observe the issue by adding or modifying the Tailwind CSS classes, saving your changes, and restarting the development server. The changes won't be applied. Please refer to bug.js and bugSolution.js for details.
The provided solution in bugSolution.js
illustrates the fix for this issue, which involves addressing the potential issues in the project build configuration and cache management.