Skip to content

Add support to limit which components this applies to #27

@TotalTechGeek

Description

@TotalTechGeek

Hi, and I'm happy to make these contributions via PR, but I wanted to create an issue to get sign-off,

I'd love some configuration options to have stricter control over what components this plugin affects,

In order of ascending preference:

Namely:

  • Option to pass in a Regex / Function that decides if the component's name matches (using node.id.name). Potentially if it's a function, it could return a string to programatically generate the component display name (I personally do not need this)
  • Option to decide which types of components should be injected into. (Class-Based, Var Declaration Based, etc)
  • Option to decide if this only applies to components that are exported on the top level of a file.

I would've suggested a folder / file restriction, but I realize that's better served by Webpack already :P

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions