developit / developit/microbundle

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

Aperta
#789 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
8.1k
Fork
358
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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 😅

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.