Skip to content

Support for configure wrap condition #191

@supersnager

Description

@supersnager

Sometimes you may want to remove propTypes for production build, but sometimes not.
For example when your library is imported in storybook, you want not to remove propTypes, because storybook reads it to show in docs page.

I think, that plugin should support this case - condition string should be configurable.

In storybook scenario wrap condition might look like this:

if (process.env.NODE_ENV !== "production" || process.env.NOT_REMOVE_PROP_TYPES) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions