Skip to content

Commit

Permalink
Add babel performance-related plugins for prod and update associated …
Browse files Browse the repository at this point in the history
…package.json docs
  • Loading branch information
coryhouse committed Jul 26, 2016
1 parent 492e5b7 commit 47298a3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .babelrc
Expand Up @@ -9,6 +9,12 @@
"presets": [
"react-hmre"
]
},
"production": {
"plugins": [
"transform-react-constant-elements",
"transform-react-remove-prop-types"
]
}
}
}
4 changes: 2 additions & 2 deletions docs/FAQ.md
Expand Up @@ -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 |
Expand All @@ -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 |
Expand Down
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -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",
Expand Down

0 comments on commit 47298a3

Please sign in to comment.