You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alternative 1: First I tried to omit an :uno: prefix by using custom regexp /(?<quot>["'`])([^$\n"'`]+?)(?:\k<quot>)/g but it can brake the app when attribute value is the same as relevant uno class. The value will be replaced with uno-<hash>, which is not desired
Example:
<inputtype="hidden">
will be replaced with
<inputtype="uno-<hash>">
Alternative 2: create a Vite plugin that will statically analyze the code and add an :uno: prefix to all class attributes/directives.
Disadvantages:
can take a lot of time to implement
it enforces class compilation without the ability to partially apply compilation and thence developers have no leverage over it
Clear and concise description of the problem
It would be great to have some automated solution when developers want to use a compile class transformer across the whole project
Suggested solution
The possible solution is to add a new ESLint rule, which can handle it
Example:
Alternative
Alternative 1: First I tried to omit an
:uno:
prefix by using custom regexp/(?<quot>["'`])([^$\n"'`]+?)(?:\k<quot>)/g
but it can brake the app when attribute value is the same as relevant uno class. The value will be replaced withuno-<hash>
, which is not desiredExample:
will be replaced with
Alternative 2: create a Vite plugin that will statically analyze the code and add an
:uno:
prefix to all class attributes/directives.Disadvantages:
Additional context
No response
Validations
README.md
of using the package.The text was updated successfully, but these errors were encountered: