Skip to content

Feature: Add --m3 option for advanced minification #1

Description

@MathieuSoysal

Summary

Add a new CLI option --m3 to CG-Bundler.

Details

  • The --m3 flag should perform all actions of the current --m2 minification (aggressive minify with whitespace replacements).
  • In addition, --m3 should also minify function names and variable names in the bundled output.
  • The goal is to further reduce the output size and obfuscate code, making reverse engineering more difficult.

Motivation

Users who want maximum minification would benefit from a mode that shortens identifiers as well as whitespace.

Acceptance Criteria

  • New --m3 CLI flag is recognized by the tool.
  • When used, output has function and variable names minified in addition to the --m2 effects.
  • Adequate tests are provided for this new feature.
  • Documentation is updated to describe the new flag.

For reference, see how --m2 is currently handled in the project: README.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions