diff --git a/.babelrc b/.babelrc index ae308aa19..f50332fc6 100644 --- a/.babelrc +++ b/.babelrc @@ -9,6 +9,12 @@ "presets": [ "react-hmre" ] + }, + "production": { + "plugins": [ + "transform-react-constant-elements", + "transform-react-remove-prop-types" + ] } } } diff --git a/docs/FAQ.md b/docs/FAQ.md index 6181ae98e..e468c5dec 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -67,7 +67,7 @@ Unfortunately, scripts in package.json can't be commented inline because the JSO |babel-core|Babel Core for transpiling the new JavaScript to old | |babel-loader|Adds Babel support to Webpack | |babel-plugin-react-display-name| Add displayName to React.createClass calls | -|babel-plugin-react-transform| Add support for transforming React code to Babel | +|babel-plugin-transform-react-constant-elements | Performance optimization: Hoists the creation of elements that are fully static to the top level. reduces calls to React.createElement and the resulting memory allocations. [More info](https://medium.com/doctolib-engineering/improve-react-performance-with-babel-16f1becfaa25#.2wbkg8g4d) | |babel-preset-es2015|Babel preset for ES2015| |babel-preset-react-hmre|Hot reloading preset for Babel| |babel-preset-react| Add JSX support to Babel | @@ -87,7 +87,7 @@ Unfortunately, scripts in package.json can't be commented inline because the JSO |html-webpack-plugin|Generates custom index.html for each environment as part of webpack build| |mocha| JavaScript testing library | |node-sass| Adds SASS support to Webpack | -|parallelshell| Display results of multiple commands on single command line | +|npm-run-all| Run multiple scripts at the same time | |postcss-loader| Adds PostCSS support to Webpack | |react-addons-test-utils| Adds React TestUtils | |rimraf|Delete files | diff --git a/package.json b/package.json index 603289020..28ffcd3a8 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,8 @@ "babel-core": "6.11.4", "babel-loader": "6.2.4", "babel-plugin-react-display-name": "2.0.0", + "babel-plugin-transform-react-constant-elements": "6.9.1", + "babel-plugin-transform-react-remove-prop-types": "0.2.7", "babel-preset-es2015": "6.9.0", "babel-preset-react": "6.11.1", "babel-preset-react-hmre": "1.1.1",