developit / developit/microbundle

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

未關閉
#789 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
8.1k
分支
358
PR 合併指標
30 天內沒有已合併 PR

描述

In both [Readme](https://github.com/developit/microbundle/blob/master/README.md) and [mangle.json wiki page](https://github.com/developit/microbundle/wiki/mangle.json), 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 😅

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。