Skip to content

Commit

Permalink
feat(maleo-core/build): remove proptypes on production (#223)
Browse files Browse the repository at this point in the history
optimisation for react on production by removing proptypes
  • Loading branch information
alvinkl authored Jul 31, 2019
1 parent 178b4a0 commit 766fcd1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/Maleo.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"@babel/runtime": "7.1.2",
"@babel/runtime-corejs2": "7.2.0",
"babel-loader": "8.0.4",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"case-sensitive-paths-webpack-plugin": "2.1.2",
"compression": "1.7.4",
"es6-promise": "4.2.5",
Expand Down
1 change: 1 addition & 0 deletions packages/Maleo.js/src/build/babel/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const preset = (context, opts = {}) => {
},
],
// for production
!isDevelopment && require('babel-plugin-transform-react-remove-prop-types'),
// require('@babel/runtime'),
].filter(Boolean);

Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2486,6 +2486,11 @@ babel-plugin-syntax-object-rest-spread@^6.13.0:
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5"
integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=

babel-plugin-transform-react-remove-prop-types@^0.4.24:
version "0.4.24"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.24.tgz#f2edaf9b4c6a5fbe5c1d678bfb531078c1555f3a"
integrity sha512-eqj0hVcJUR57/Ug2zE1Yswsw4LhuqqHhD+8v120T1cl3kjg76QwtyBrdIk4WVwK+lAhBJVYCd/v+4nc4y+8JsA==

babel-polyfill@6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153"
Expand Down

0 comments on commit 766fcd1

Please sign in to comment.