question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update Babel to support new TypeScript 3.7.2 syntax features

See original GitHub issue

Is your proposal related to a problem?

When updating my projects TypeScript version to the new 3.7.2 and trying to use the new syntax, such as optional chaining:

foo?.bar()

I get an error during runtime saying that Babel does not support this feature:

Support for the experimental syntax ‘optionalChaining’ isn’t currently enabled Add @babel/plugin-proposal-optional-chaining (https://git.io/vb4Sk) to the ‘plugins’ section of your Babel config to enable transformation.

Describe the solution you’d like

It would be nice if the Babel config made by CRA would install these new features. I do not want to have to eject to customize my Babel config.

Describe alternatives you’ve considered

I’ve tried installing the Babel plugin as described here with no luck: https://babeljs.io/docs/en/babel-plugin-proposal-nullish-coalescing-operator

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:32
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

28reactions
rhyekcommented, Nov 12, 2019

I’m still waiting for a CRA release to start using TS 3.7 for all our projects (monorepo).

15reactions
ianschmitzcommented, Nov 9, 2019

Dupe of #7431. We’ll be releasing support in the next few days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

7.7.0 Released: Error recovery and TypeScript 3.7 - Babel.js
Today we are releasing Babel 7.7.0! This release includes new parser features like top-level await ( await x() , Stage 3) and Flow...
Read more >
Documentation - TypeScript 3.7
Nullish Coalescing. Playground. The nullish coalescing operator is another upcoming ECMAScript feature that goes hand-in-hand with optional chaining, and which ...
Read more >
TypeScript 3.7.2 - Support for the experimental syntax ...
I am wondering if I need babel plugin & config when I am using TS already, and how should I fix the error?...
Read more >
Changelog | Meteor API Docs
updated Typescript deps and meteor babel. ... Updated babel to 7.17.1. ... in your mongouri to avoid the new mongo driver Service Discovery...
Read more >
TypeScript and Babel 7 - Microsoft Developer Blogs
While Babel can take over compiling/transpiling – doing things like erasing your types and rewriting the newest ECMAScript features to work in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found