react-scripts@2.0.0-next: babel-preset-env configuration issues
alexeyraspopov opened this issue · 2 comments
alexeyraspopov commented
Is this a bug report?
Yes
Did you try recovering your dependencies?
The issue appeared right after creating an app.
Environment
node -v
:8.9.4
npm -v
:5.6.0
yarn -v
:1.3.2
npm ls react-scripts
(if you haven’t ejected):react-scripts@2.0.0-next.b2fd8db8
Then, specify:
- Operating system: macOS Sierra
- Browser and version (if relevant):
Steps to Reproduce
(Write your steps here:)
yarn create react-app reproducing-app
cd reproducing app && yarn add react-scripts@2.0.0-next.b2fd8db8
- Add
async function* something() { }
toindex.js
yarn start
Expected Behavior
The app starts, the code is compiled, async generators are transpiled using babel-preset-env
Actual Behavior
As reported in #3815 (comment):
Failed to compile.
./src/App.js
Syntax error: /Users/alexey/xxx/src/App.js: Support for the experimental syntax 'asyncGenerators' isn't currently enabled (25:15):
23 |
24 |
> 25 | async function* Act() {
| ^
26 |
27 | }
28 |
Add @babel/plugin-proposal-async-generator-functions (https://git.io/vb4yp) to the 'plugins' section of your Babel config to enable transformation.
n3tr commented
I'm working on PR #4222, add @babel/plugin-proposal-async-generator-functions
to support async generator function.
iansu commented
This has been fixed in babel 7.0.0-beta.46. We've upgraded our version of babel and will be releasing a new alpha of react-scripts 2.0 soon.