After further investigation, RTFM and some mangling with webpack5 I got a completely working Sage 9 / TailwindCSS 2 / Webpack 5 / PostCSS 8 setup.
It’s a quite heavily customized sage install, so your mileage may vary, the main customizations are:
- needs Node 10+ (webpack 5 requirement)
- it’s TailwindCSS-tailored so if you want Bootstrap back you have to restore almost oll the styles and even jquery dependency
- yeah, jquery is no more a dependency
- it’s CSS-based so if you want to use SASS you have to rename the styles, though webpack config should support it out-of-the-box (but I made no tests); PostCSS manages imports, nesting and autoprefixing and TailwindCSS every other feature, so you should ask yourself if you really need SASS with an utility-first framework
- uses webpack 5 new Assets Modules so
file-loader
andurl-loader
are gone for good
@joshb the watcher should be fully working, if you want to try it out.
The branch is 9-webpack5-tailwind2