babel / babel/minify

Unneeded parenthesis insertion

Open
#451 0 comments 0 reactions 0 assignees View on GitHub
babel enhancement
Dominant language
JavaScript
Stars
4.4k
Forks
217
PR merge metrics
No merged PRs in 30d

Description

The following snippet is not properly minified because babili adds unneeded parenthesis.

Input:

```js
const f=n=>[...a=Array(n)] // 26 bytes
```

Output:

```js
const f=b=>[...(a=Array(b))]; // 29 bytes
^ ^
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.