Closed srnnkls closed 1 year ago
I've never heard of tailwind + prettier sorting a given class name, but that's not what ppx does. PPX doesn't transform the source code, which means it does change the internal representation when the source code is processed inside the compiler.
So I think prettier can be used to parse expressions that are %twc("c1 c2 ...")
if you set it up to do so well, independent of ppx.
Of course, a ppx can only influence the target. So it would be theoretically possible to produce sorted output on the js side, right?
Thank you and sorry for the noise!
It's technically correct that PPX affects JS output. But unfortunately, that's a job better suited to a linter or prettier, so it's better to keep it out of the way of compilation speed.
Are there plans to implement automatic sorting of classes, based on the convention followed by tw’s own prettier plugin?