Skip to content

Add labels for debugging #4

@itsMapleLeaf

Description

@itsMapleLeaf

Having the full class string on elements is usually fine, but since we're in compile land, some debugging labels would be really helpful. A few ways to accomplish this, in order of preference

  • A data attribute data-tw-component="FileName"
    Easiest way to go, keeps the class name logic as is with a completely additive attribute

  • Appending to the className tw-FileName bg-blue-500 text-white
    Also completely doable, might introduce some additional clutter on the class name though

  • Using labels + apply for everything
    I'm already iffy on using apply for everything, could introduce unnecessary overhead in the cases where apply is already being used. That, and the labels proposal hasn't happened yet, and changes in that will require changes in the transformer. In short, lack of stability here

Additionally, only do this in dev, and not in prod. Maybe make it configurable, but I don't see a need? Someone might have a problem with it at some point, so maybe

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions