This plugin removes all debugger;
statements.
In
debugger;
Out
npm install babel-plugin-transform-remove-debugger --save-dev
.babelrc
{
"plugins": ["transform-remove-debugger"]
}
babel --plugins transform-remove-debugger script.js
require("@babel/core").transform("code", {
plugins: ["transform-remove-debugger"]
});