A specialized minifier for ES6 class fields and member functions, currently at version 4.0.0. Standard JavaScript minifiers cannot rename class properties or methods without breaking runtime behavior because they cannot track object instances. This package works around that by automatically renaming any property or method starting with underscore (`_`), which is a safe convention not used by built-in JavaScript names. It is meant to be used alongside a general-purpose minifier (like terser) to achieve complete code minification. The package has a Node.js engine requirement of >=13 and has no dependencies.
npm install es6-class-minifyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates how to import, create an instance, and minify a class that uses underscore-prefixed properties.
Ensure all class members you want minified start with an underscore. Alternatively, use new ClassMinifierOptions with a custom prefix.
Minify each file separately or ensure class file boundaries are isolated. No built-in collision detection.
Chain this package with a general minifier like terser for complete minification.
Use import { ES6ClassMinify } from 'es6-class-minify'.Run npm install es6-class-minify and ensure node_modules is correct.
Instantiate with new ES6ClassMinify() before calling .minify().
No dependency data recorded yet.