You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reposting this from Babel issues as Babel team says it's acornjs related.
Bug Report
Tested on clean create-react-app install.
This function in any component file breaks React app:
constmyFn=({ set =''})=>{};
Current behavior
./src/App.js 7:6
Module parse failed: Unexpected token (7:6)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
* ./node_modules/eslint-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
|
| const myFn = ({
> set = ''
| }) => {};
|
if I change set to anything else, everything works fine.
Input Code
constmyFn=({ set =''})=>{};
Expected behavior
Should transpile without errors.
Reposting this from Babel issues as Babel team says it's acornjs related.
Bug Report
Tested on clean
create-react-app
install.This function in any component file breaks React app:
Current behavior
if I change
set
to anything else, everything works fine.Input Code
Expected behavior
Should transpile without errors.
Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
Clean, not ejected
create-react-app
.Environment
Possible Solution
Do not use
set
as object propertyThe text was updated successfully, but these errors were encountered: