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.

Enable async iterators in Babel configuration

See original GitHub issue

Recently, I tried to write an async generator for a project I’m working on. Unfortunately it doesn’t work because Create React App isn’t configured to transpile them by default. As far as I know, the only way to get this working is by ejecting and adding the plugin—is this correct?

Async iteration is a stage 3 proposal now, so it’s unlikely it will change. Actually, I have no idea what kind of standard or process exists for changing the default Babel configuration in Create React App, so I apologize if this isn’t an appropriate request or if the issue is a lot more complicated than I think. But I just figured I’d raise the issue…

Just for completeness, here’s a simple version of what I was trying to do. In this repo, I’ve ejected, installed babel-plugin-transform-async-generator-functions, and added the transform-async-generator-functions plugin to the package.json.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

7reactions
infinitelukecommented, Jun 1, 2018

is anyone working on this now that we’re on babel 7? I’m happy to submit a PR.

2reactions
gaearoncommented, Oct 30, 2017

This is probably only going to be released in Babel 7.

Read more comments on GitHub >

github_iconTop Results From Across the Web

babel/plugin-syntax-async-generators
Syntax only. It's unlikely you want to use this plugin directly as it only enables Babel to parse this syntax. Instead, use plugin-proposal-async-generators ......
Read more >
Asynchronous iteration • Exploring ES2018 and ES2019
To get an async iterator from an object iterable , you call GetIterator(iterable, async) ( async is a symbol). If iterable doesn't have...
Read more >
@babel/plugin-proposal-async-generator-functions | Yarn - Yarn
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >
Configuring Jest
This is due to the need to load the actual transformers (e.g. babel or typescript ) to perform transformation. setup.js. module.exports = async...
Read more >
Documentation - Using Babel with TypeScript
This likely means duplicating some of your babel config into a corresponding tsconfig.json and ensuring these flags are enabled: "compilerOptions": {.
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