Skip to content

Commit

Permalink
perf(package): add babel react optimization plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
levithomason committed Oct 25, 2016
1 parent 2451875 commit 8c99c72
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@
"stage-1"
],
"plugins": [
"lodash"
"lodash",
"transform-react-constant-elements",
["transform-react-remove-prop-types", {
"mode": "wrap"
}],
["transform-runtime", {
"polyfill": false,
"regenerator": false
}]
],
"env": {
"development": {
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,13 @@
"babel-plugin-__coverage__": "^11.0.0",
"babel-plugin-lodash": "^3.1.4",
"babel-plugin-react-transform": "^2.0.2",
"babel-plugin-transform-react-constant-elements": "^6.9.1",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-1": "^6.5.0",
"babel-register": "^6.18.0",
"babel-runtime": "^6.18.0",
"babel-standalone": "^6.18.0",
"brace": "^0.8.0",
"chai": "^3.5.0",
Expand Down
2 changes: 1 addition & 1 deletion webpack.umd.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const webpackUMDConfig = {
externals: {
react: 'React',
'react-dom': 'ReactDOM',
Babel: 'babel-standalone',
},
plugins: [
new webpack.DefinePlugin(config.compiler_globals),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
Expand Down

0 comments on commit 8c99c72

Please sign in to comment.