Terser

Use this skill when the user wants to minify JavaScript code for production — compress, mangle, tree-shake, and eliminate dead code in ES6+ files.

javimosch 1ef1775 731 B Updated

File contents

Terser Plugin

Terser minifies and optimizes JavaScript for ES6+. Successor to UglifyJS.

Usage Examples

  • "minify app.js for production"
  • "compress with source map generation"
  • "mangle variable names for size reduction"
  • "remove console.log statements from build"

Installation

npm install -g terser

Key Features

  • ES6+ syntax support
  • Variable name mangling
  • Dead code elimination
  • Tree shaking
  • Expression optimization
  • Source map generation
  • Comments preservation or removal
  • Configurable compression level

javimosch/supercli/tree/main/plugins/terser/skills/quickstart commit 1ef1775e49

Frequently asked questions

npx skillmds@latest add javimosch/terser