Terser is a JavaScript minifier and compressor designed to reduce file size through whitespace removal, symbol mangling, and logic optimization for ES6+. It functions as a toolkit for minification, a code mangler for shortening variable and property names, and a dead code eliminator that evaluates constant expressions to remove unreachable logic. The project operates as an AST toolkit that parses JavaScript source into SpiderMonkey AST format for structural analysis. It generates source maps to link compressed production code back to the original source, ensuring that minified bundles remain
magic-string is a low-level JavaScript library designed for compilers and bundlers to perform source code transformations. It serves as a string transformation utility and source map manipulation library that allows for modifying text while automatically tracking character offsets. The library enables the modification of source code strings through insertions, replacements, and removals without losing the relationship to original source positions. It specifically provides mechanisms to generate mapping files that link transformed output text back to original source file coordinates. Capabili
The browserify-handbook is a comprehensive documentation guide for Browserify, a CommonJS module bundler and JavaScript build tool. It explains how to compile Node.js style modules into single JavaScript files for execution within web browsers. The guide covers the generation of universal module definition bundles that function across Node, AMD, and browser environments. It also details the use of browser-compatible polyfills for Node.js built-in modules to ensure cross-platform compatibility. The manual describes capabilities for source code transformation, frontend build automation, and we
UglifyJS is a tool for JavaScript code minification, AST manipulation, and source beautification. Its primary purpose is to reduce the file size of JavaScript source code by removing whitespace and shortening variable names to optimize frontend build assets. The project differentiates itself through its ability to programmatically analyze and transform code using abstract syntax trees. It performs constant folding analysis and conditional compilation to eliminate unreachable or redundant code, and it employs a multi-pass compression pipeline to maximize total file size reduction. The tool pr
This project is a source map implementation library used for generating, parsing, and consuming source maps. It provides the functional components necessary to link transformed or minified code back to original source files, acting as a tool for code transformation debugging.
The main features of mozilla/source-map are: Minified Code Debugging, Source-to-Generated Code Mappings, Coordinate Translation Utilities, Transformation Chaining, Source Map Resolution, Source Map Generators, Map Merging, Source Map Composers.
Open-source alternatives to mozilla/source-map include: rich-harris/magic-string — magic-string is a low-level JavaScript library designed for compilers and bundlers to perform source code… terser/terser — Terser is a JavaScript minifier and compressor designed to reduce file size through whitespace removal, symbol… browserify/browserify-handbook — The browserify-handbook is a comprehensive documentation guide for Browserify, a CommonJS module bundler and… mishoo/uglifyjs — UglifyJS is a tool for JavaScript code minification, AST manipulation, and source beautification. Its primary purpose… web-infra-dev/rspack — Rspack is a high-performance web bundler written in Rust that packages JavaScript and TypeScript for web applications.… istanbuljs/nyc — nyc is a JavaScript code coverage tool and command-line interface that instruments source files to track the execution…