minify-constant-folding: splitting a string may result in longer code
Open
enhancement
- Dominant language
- JavaScript
- Stars
- 4.4k
- Forks
- 217
- PR merge metrics
- No merged PRs in 30d
Description
Expanding the example given in the readme (without extra space shown there) gives:
```js
"a,b,c,d,e,f,g".split(",");
["a","b","c","d","e","f","g"];
```
Contributor guide
Research direction
Start with the expanded example in the README and trace the constant-folding behavior for String.prototype.split. Compare the minified output length with the original expression, then verify that folding is retained only when it does not produce longer code. The payload does not name a source file or test, so those must be located in the repository.
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
- 38/100