I\'m setting up webpack to my react project using yarn and this error appears:
ERROR in ./src/app.js 67:6 Module parse failed: Unexpected token (67:6) Y
The selected answer missing some details:
It should be test: '/\.(js|jsx)$/', replaced with test: /\.js|\.jsx$/
test: '/\.(js|jsx)$/'
test: /\.js|\.jsx$/
\: is an escape character in this case for .
\: is an escape character
.
|: is an Alternation / OR operand
$: is end of line
Hopefully this is useful for you.
Source: https://www.rexegg.com/regex-quickstart.html