Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

De-duping functionally identical calls #44

Closed
andparsons opened this issue Mar 16, 2021 · 2 comments
Closed

De-duping functionally identical calls #44

andparsons opened this issue Mar 16, 2021 · 2 comments

Comments

@andparsons
Copy link

Is there any way I can be warned if I have 2 functionally identical calls,

Eg: sm:hover:disabled:bg-red-500 & sm:disabled:hover:bg-red-500

@andparsons
Copy link
Author

andparsons commented Mar 16, 2021

In the same vain, perhaps a warning for using something like w-[100%] when w-full exists in core?

@RobinMalfait
Copy link
Member

Hey! Thank you for your suggestion!
Much appreciated! 🙏

For your first question, yep we will make sure that you get notified of this using errors/warnings.
For your second question, while it is a nice idea, it could degrade performance (haven't measured it yet). Because you would have to check the contents of each existing rule and each rule you are applying.

We are also generating on demand, which means that we don't even know when certain rules that have been used yet (if we knew, then we would be back in AOT land). So long story short, if you used w-full in one spot and use w-[100%] in another, we could detect it, otherwise it is a bit more challenging.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants