Babel preset for optimizing react code
This preset is nothing more than a collection of Babel plugins intented to improve the performance of React apps. It is inspired on babel-react-optimize, but customized for my own use cases.
- @babel/plugin-transform-react-constant-elements
- @babel/plugin-transform-react-inline-elements
- babel-plugin-transform-react-remove-prop-types
- babel-plugin-transform-remove-console
In .babelrc
/babel.config.js
:
{
// ...
"env": {
"production": {
"presets": ["babel-preset-react-optim"]
}
}
}
This project uses node and npm.
$ npm install babel-preset-react-optim
$ # OR
$ yarn add babel-preset-react-optim
- Fork it and create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am "Add some feature"
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
MIT