babel / babel/minify

babel-plugin-transform-inline-environment-variables does not support destructuring

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

Description

**Is your feature request related to a problem? Please describe.**
Does not work:
```javascript
const { SOME_VAR } = process.env
```

Works:
```javascript
const SOME_VAR = process.env.SOME_VAR
```

**Describe the solution you'd like**
It would be nice if this plugin supported destructuring.

**Additional context**
I wasn't sure why my environment variables weren't working until I saw this comment: https://github.com/babel/minify/issues/687#issuecomment-523089830

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.