A pass for the esmangle ECMAScript code mangler/minifier that removes wasted (empty/unnecessary) blocks from JavaScript ASTs. Version 0.0.2 is the latest and only release, with no further updates since 2012. This package is a utility component of the esmangle ecosystem, focused on a single optimization pass. It is a legacy package with no release cadence and is superseded by more modern minification tools. Its key differentiator is its specific, minimal scope compared to full-featured minifiers.
npm install esmangle-pass-remove-wasted-blocksNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parses JavaScript code, removes wasteful block statements from the AST, and outputs minified code.
Use require('esmangle-pass-remove-wasted-blocks').removeWastedBlocksConsider using terser or other modern minifiers.
Ensure esprima and escodegen are installed and used correctly.
Combine with other esmangle passes or use a full minifier.
Use: const removeWastedBlocks = require('esmangle-pass-remove-wasted-blocks').removeWastedBlocks;Run npm install esmangle-pass-remove-wasted-blocks.