Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Latest commit

 

History

History
56 lines (42 loc) · 691 Bytes

README.md

File metadata and controls

56 lines (42 loc) · 691 Bytes

Babel Plugin for removing propTypes property from ES2015 classes

Removes propTypes property from classes

Example

In

  Class Foo {
    propTypes: {
      foo: React.PropTypes.string
    }
  }

Out

  Class Foo {
  }

Installation

$ npm install --save-dev babel-plugin-remove-prop-types

Usage

Via .babelrc (Recommended)

.babelrc

{
  "env": {
    "production": {
      "plugins": ["remove-prop-types"]
    }
  }
}

Via CLI

$ babel --plugins remove-prop-types script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["remove-prop-types"]
});