Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scinos/test-babel-not-optional-chaining
https://github.com/scinos/test-babel-not-optional-chaining
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/scinos/test-babel-not-optional-chaining
- Owner: scinos
- Created: 2021-04-13T09:21:37.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-04-13T09:47:41.000Z (over 3 years ago)
- Last Synced: 2024-11-05T18:03:18.462Z (about 2 months ago)
- Language: JavaScript
- Size: 28.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Optional chaining bug in @babel/preset-env
## To reproduce
Run
```
npm install
npm run build
```## Expected result
`dist/index.js` contains `?.`
## Actual result
`dist/index.js` is transpiled down to not use `?.`
## Fixes
### Fix 1
Downgrading these packages produces the expected result:
* `@babel/[email protected]` to `@babel/[email protected]`
* `@babel/[email protected]` to `@babel/[email protected]`### Fix 2
Changing `.browserslistrc` form `Chrome 88` to `Firefox 88` produces the expected result.