Package Exports
- babel-minify
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (babel-minify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
babel-minify
Node API + CLI
Install
npm install babel-minify --save-dev
Example
import minify from 'babel-minify';
const outputCode = minify(inputCode, {
conditionals: true,
drop_debugger: true
});
Options
conditionals
- [boolean] | optimize conditional expressions and statementsglobal_defs
- [object] Global Objects that need to be inserted at build timeevaluate
- [boolean] Evaluate constant expressionsdead_code
- [boolean] Remove dead codedrop_debugger
- [boolean] Dropdebugger
statementsdrop_console
- [boolean] Drop console log, error, and info statementsbabelrc
- [boolean] Should other babelrc be used for transpiling