babel / babel/minify

babel-plugin-minify-mangle-names doesn't rename calls in JSX expressions after mangling the variable name

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

Description

**Describe the bug**

When I try to transform a code using this plugin, it mangles the name correctly and replaces all the mangled variable calls with the new naming except for JSX expressions.

**To Reproduce**

Minimal code to reproduce the bug

```
Import Flex from 'some-library';

const Component = () => Something
```

**Actual Output**

If there is no Error thrown,

```
Import i from 'some-library';

const s = () => Something
```

**Expected Output**

```
Import I from 'some-library';

const j = () => Something
```

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.