Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.