Skip to content
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.

Commit

Permalink
[Babel] Improve the production build
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Feb 18, 2016
1 parent b54377e commit c953454
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ Features
* [babel-preset-react-hmre](https://github.com/danmartinez101/babel-preset-react-hmre) for:
* react-transform-hmr (HMR for React components)
* redbox-react (visible error reporting for React components)
* [babel-plugin-transform-react-constant-elements](https://babeljs.io/docs/plugins/transform-react-constant-elements/) save some memory allocation
* [babel-plugin-transform-react-remove-prop-types](https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types) remove `PropTypes`
* [ESLint](http://eslint.org)
* Uses [Standard Style](https://github.com/feross/standard) by default, but you're welcome to change this!
* Includes separate test-specific `.eslintrc` to support chai assertions
Expand Down
6 changes: 6 additions & 0 deletions build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ webpackConfig.module.loaders = [{
}]
}]
]
},
production: {
plugins: [
'transform-react-remove-prop-types',
'transform-react-constant-elements'
]
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
"babel-eslint": "^5.0.0-beta6",
"babel-loader": "^6.2.0",
"babel-plugin-react-transform": "^2.0.0",
"babel-plugin-transform-react-constant-elements": "^6.5.0",
"babel-plugin-transform-react-remove-prop-types": "^0.2.2",
"babel-plugin-transform-runtime": "^6.3.13",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
Expand Down

0 comments on commit c953454

Please sign in to comment.