Been using it for a while and its speed is nuts. To calrify, the latest comes with Tailwindcss not JIT.
To install @tailwindcss/jit you’d need to run yarn add -D @tailwindcss/jit
then replace the following inside webpack.mix.js
This does indeed work for latest Sage release, and as you say - the speed compiling is unreal. Unfortunately it didn’t work for a slightly earlier version of Sage 10 - just threw up a range of few PostCSS errors. Think its time to upgrade to latest version.
You’d need to upgrade to postcss v8, and tailwindcss v2 for jit to work. You have those out of the box with latest Sage 10. You’d need to upgrade the build process for any older release.
Can you define “breaks” with some details? What happens, specifically? i.e. does the build fail; does the build succeed but styles are missing; does the build succeed but but styles are wrong; etc.
What I see is after running yarn start Browsersync sets up properly. If I change something in a .scss file the watch task nearly instantaniously compiles (340ms), but I do not get the typical [Browsersync] Reloading Browsers... and the Browsersync badge after refresh in the browser.
If I do a manual hard refresh those SCSS changes are not refelcted. If I change a blade template, refreshing works fine.
That of course resolved my broken styles issue and everything is working great and super speedy!
But now when I run yarn build, it doesn’t take me back to the terminal after the build is complete. Instead it almost acts like the yarn watch command without watching anything.
The terminal on the left is yarn build and the right is yarn start. Previously running yarn build would exit back to the terminal after the build is complete. This isn’t extremely important but I often run yarn build if something appears to be getting cached and it was nice to have this terminal ready to run commands if needed. Now I have to exit each time I run build.
Purge is only used on yarn build and I am having issues with yarn start. Not sure if that question was for me. My current purge settinsg are the defaults in latest Sage 10 with the *.vue removed. content: ['./app/**/*.php', './resources/**/*.php', './resources/**/*.js'],
With @tailwindcss/jit, purge is used for yarn start as well. However, instead of generating all possible classes then purge, it used the purge paths to see which classes it needs to generate.