Teastorm
Teastorm
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Teastorm on 1/8/2025 in #questions
Sorting Tailwind classes without `prettier-plugin-tailwindcss`
I was wondering if there is any public function or library that is able to take a string or Array<string> of classes and apply the same or similar method used by the plugin. My use case is for a custom class merger I built. The issue is that the result can't be accessed by the plugin for obvious reasons. I thought I could import whatever functions the plugin uses internally and piggyback off that, but they aren't exposed by the package. Are there any alternatives or workarounds I could use? It's not a big deal at the moment, but it makes me uncomfortable not having all classes sorted.
5 replies