babel / babel/minify

Labels should be minified

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

Description

Currently labels are not minified:

Input:

```js
abc: for (var a = [1, 2, 3, 4], i = 0; i < a.length; ++i) {
continue abc
}
def: for (var a = [1, 2, 3, 4], i = 0; i < a.length; ++i) {
for (var j = i; j < a.length; ++j) {
if (i + j > 7) {
continue def
}
}
}
```

Current output:

```js
abc:for(var a=[1,2,3,4],i=0;i

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the JavaScript input from the issue and locating the minifier logic that handles labels and continue statements. Compare the generated output with the expected output; done means labels are shortened where needed and continue statements use the corresponding shortened label.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.