From b5d1f26df69534a8ed0d711ac73e930a9e7f8578 Mon Sep 17 00:00:00 2001 From: Todd Moore Date: Tue, 16 Jan 2018 15:33:39 +1100 Subject: [PATCH] feat(index): Added plugin to strip flow types In order for the style guide to support flow types going forward we'll need to strip the types during compliation. --- index.js | 4 +++- package.json | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 81fb8c0..4d132b0 100644 --- a/index.js +++ b/index.js @@ -108,7 +108,9 @@ const getCommonLoaders = includes => [ plugins: [ require.resolve('babel-plugin-transform-class-properties'), require.resolve('babel-plugin-transform-object-rest-spread'), - require.resolve('babel-plugin-add-react-displayname') + require.resolve('babel-plugin-add-react-displayname'), + require.resolve('babel-plugin-flow-react-proptypes'), + require.resolve('babel-plugin-transform-flow-strip-types') ] } } diff --git a/package.json b/package.json index 0f4a45f..b3c5802 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,9 @@ "babel-core": "^6.26.0", "babel-loader": "^7.1.2", "babel-plugin-add-react-displayname": "^0.0.4", + "babel-plugin-flow-react-proptypes": "^17.1.0", "babel-plugin-transform-class-properties": "^6.24.1", + "babel-plugin-transform-flow-strip-types": "^6.22.0", "babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-preset-es2015": "^6.24.1", "babel-preset-react": "^6.24.1",