google / google/closure-compiler
"import *" seems to be broken
Open
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
input:
```jsx
import * as THREE from 'three'
export default function(name) {
return THREE[name]
}
```
output (compilation_level: SIMPLE_OPTIMIZATIONS):
```jsx
import * as THREE from 'three'
export default function (a) {
return THREE[a]
}
```
👍
input:
```jsx
import * as THREE from 'three'
export default function(name) {
const o = new THREE.Group()
return THREE[name] + o.id
}
````
output:
```jsx
import { Group } from 'three'
export default function (a) {
let b = new Group()
return THREE[a] + b.id
}
```
😕 it took away the `THREE` import for some reason, `return THREE[a]` is now invalid.
Contributor guide
Assessment
This issue has not been assessed yet.