Closed
Description
preset-react-app has the issue described here: https://github.com/leebenson/babel-preset-node5/issues/4
Is this a bug report?
Yes
Steps to Reproduce
set a browserslist in package.json which which includes only browsers which support for...of
loops, e.g.
"browserslist": {
"production": ["last 1 chrome versions"]
},
Attempt to build an application which contains a for...of
loop inside a generator function, like so:
function* willFailCompilation(array) {
for (const item of array) {
yield item;
}
}
Expected Behavior
The app does not fail compilation
Actual Behavior
This error is shown:
Failed to compile
Module build failed: Error: unknown Statement of type "ForOfStatement"
at Array.forEach ()
Reproducible Demo
[none]
Metadata
Metadata
Assignees
Labels
No labels