basically, im using iconfiy with tailwind and addDynamicIconSelectors(), where you are supposed to add icon ass classes like this ‘className = ‘icon-[icon-name]”, and i have a costume component that accepts that name of the class and adds it to a div with the above className, the issue is tailwind is purging most (not all, for example ‘mdi:heart’ is working fine) classes and i see no icons, the icon component was already used many times in many components and pages and now im just updating it, since before i used the iconfity react component but it was causing a weird loading issue in next js where you see icons pop up, thats why i switched to tailwind
i being messing around with safelist and for example if i add ‘mdi:tag’ directly to safe list the icon works, but if i add a pattern that excluses ‘icon-[‘ for example it dosent, what is the best approach to take
Adel Hafri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.