[Docs] Mention that in mangle.json, the mangle object should be set under "minify" object

Open Beginner friendly
#789 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript
Domain
documentation

Research direction

Start with the README and the mangle.json wiki page linked in the issue, then compare their current examples with the behavior described from Microbundle's source. Update both documentation locations to show the mangle configuration nested under "minify", and confirm the examples consistently describe the expected mangle.json structure.

Written by the indexing model from the issue text.

Description

In both Readme and mangle.json wiki page, it mentions about how to mangle properties using mangle.json file.

It said:

This can be done in a mangle.json configuration file, [.....] follow the same object format:

{
  "mangle": {
    "properties": {
      "regex": "^_"
    }
  }
}

I assumed that mangle.json can contain exactly that, but apparently, after reading microbundle's source code, mangle.json expects that the configuration to be parked under "minify". So mangle.json should look something like this:

{
  "minify": {
    "mangle": {
      "properties": {
        "regex": "^_"
      }
    }
  }
}

Looks like this behavior is not documented anywhere 😅

Dominant language
JavaScript
Stars
8.1k
Forks
358
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from developit/microbundle

All issues in developit/microbundle

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.