When updating Tailwind to version 3, it caused some issues where just by saving the .twig
file didn't show the results directly; with new ability where Tailwind v3 purged unused Tailwind classes, it added an additional step for a developer had to save either .scss
file or .js
file in order to recompile the assets, thus able to repurge the style sheet so that it displays and updates the newly saved class in .twig
file.
After doing some research with numerous trial and errors, I realized Laravel Mix v6 allowed saving the .twig file to recompile the assets automatically, thus smoothing out the workflow even better.
Disclaimer - Note that this update guide is specific for upgrading Craft CMS which uses Laravel Mix v5 and Tailwind v2 to Laravel Mix v6 and Tailwind v3.