babel-plugin-transform-remove-debugger
Example
In
JavaScript
debugger;
Out
Installation
- npm
- Yarn
- pnpm
npm install babel-plugin-transform-remove-debugger --save-dev
yarn add babel-plugin-transform-remove-debugger --dev
pnpm add babel-plugin-transform-remove-debugger --save-dev
Usage
With a configuration file (Recommended)
babel.config.json
{
"plugins": ["transform-remove-debugger"]
}
Via CLI
Shell
babel --plugins transform-remove-debugger script.js
Via Node API
JavaScript
require("@babel/core").transformSync("code", {
plugins: ["transform-remove-debugger"],
});