babel / babel/minify

`undefined` as an unused value could be stripped

Open
#251 0 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

For example:

```js
x ? undefined : foo();
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the JavaScript example `x ? undefined : foo();` in the minifier and trace how conditional expressions with an unused value are handled. Add coverage showing that the unnecessary `undefined` value is stripped while the `foo()` branch remains correct; done means the transformed output preserves behavior and the regression test passes.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.