This plugin removes development warning from production code. It's recommended to be used with https://github.com/BerkeleyTrue/warning.
In
warning(condition, argument, argument);
Out
if (process.env.NODE_ENV !== 'production') {
warning(condition, argument, argument);
}
$ npm install --save-dev babel-plugin-transform-dev-warning
.babelrc
{
"env": {
"production": {
"plugins": ["transform-dev-warning"]
}
}
}
$ babel --plugins transform-dev-warning script.js
require("babel-core").transform("code", {
plugins: ["transform-dev-warning"]
});
MIT