Babel plugin that minifies object properties by renaming those prefixed with a configurable marker (default `$__`) to short names in production builds. Version 2.0.1 is stable, with no recent updates. Unlike general minifiers that cannot safely rename properties due to cross-file references, minprops explicitly marks internal properties for renaming, reducing bundle size. It integrates with Babel and supports configuration via package.json. Alternative to manual property mangling or closure compiler's property renaming, but requires prefixing all internal properties.
npm install babel-plugin-minpropsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures babel-plugin-minprops with exclude list and custom prefix, shows how properties prefixed with $__ are renamed.
Use the 'exclude' option to prevent renaming to specific short property names that might cause conflicts.
Change the prefix to something unique using the 'matchPrefix' option, e.g., '__internal'.
Ensure all intended internal properties use the configured prefix.
Avoid using dynamic property names for internal properties that you want minified.
Use Babel config options directly or ensure your project has the 'minprops' key in package.json with correct structure.
Run 'npm install --save-dev babel-plugin-minprops' and check that package.json includes it.
Use: plugins: [['babel-plugin-minprops', { exclude: [] }]]Ensure both source and consumer code use the same prefix and that the plugin runs on all relevant files (including entry points).