JSPM

babel-minify

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 25348
  • Score
    100M100P100Q135489F
  • License MIT

Babel minify Node API and CLI

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 statements
  • global_defs - [object] Global Objects that need to be inserted at build time
  • evaluate - [boolean] Evaluate constant expressions
  • dead_code - [boolean] Remove dead code
  • drop_debugger - [boolean] Drop debugger statements
  • drop_console - [boolean] Drop console log, error, and info statements
  • babelrc - [boolean] Should other babelrc be used for transpiling