about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSorin Davidoi <sorin.davidoi@gmail.com>2017-05-19 02:42:21 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-05-19 02:42:21 +0200
commitf18a6c2cf2162b11beec2b4b17db1f2fd9fdcec0 (patch)
tree0a6caad15182d81866eaec1c87728cbe7b23affc
parent25e5aa645d171f8438c6835aaaf8735e4e9cca24 (diff)
feat(babel): Strip prop types (#3122)
* feat(babel): Strip prop types

* chore(babel): Indent

* fix(babel): Move babel-plugin-transform-react-remove-prop-types to dependencies
-rw-r--r--.babelrc10
-rw-r--r--package.json1
-rw-r--r--yarn.lock6
3 files changed, 17 insertions, 0 deletions
diff --git a/.babelrc b/.babelrc
index e80364f0f..139b5b711 100644
--- a/.babelrc
+++ b/.babelrc
@@ -34,6 +34,16 @@
       "plugins": [
         "lodash",
         [
+          "transform-react-remove-prop-types",
+          {
+            "mode": "remove",
+            "removeImport": true,
+            "additionalLibraries": [
+              "react-immutable-proptypes"
+            ]
+          }
+        ],
+        [
           "transform-runtime",
           {
             "helpers": true,
diff --git a/package.json b/package.json
index f65ebaeb1..f19036477 100644
--- a/package.json
+++ b/package.json
@@ -33,6 +33,7 @@
     "babel-plugin-transform-object-rest-spread": "^6.23.0",
     "babel-plugin-transform-react-jsx-self": "^6.22.0",
     "babel-plugin-transform-react-jsx-source": "^6.22.0",
+    "babel-plugin-transform-react-remove-prop-types": "^0.4.5",
     "babel-plugin-transform-runtime": "^6.23.0",
     "babel-preset-env": "^1.4.0",
     "babel-preset-react": "^6.11.1",
diff --git a/yarn.lock b/yarn.lock
index 3c277a182..104e6f0c1 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -964,6 +964,12 @@ babel-plugin-transform-react-jsx@^6.3.13:
     babel-plugin-syntax-jsx "^6.8.0"
     babel-runtime "^6.0.0"
 
+babel-plugin-transform-react-remove-prop-types@^0.4.5:
+  version "0.4.5"
+  resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.5.tgz#79d1958437ae23d4fbc0b11d1a041498ddb23877"
+  dependencies:
+    babel-traverse "^6.24.1"
+
 babel-plugin-transform-regenerator@6.16.1:
   version "6.16.1"
   resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.16.1.tgz#a75de6b048a14154aae14b0122756c5bed392f59"