You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file."

前端 未结 5 1883
独厮守ぢ
独厮守ぢ 2021-02-05 11:02

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

5条回答
  •  别那么骄傲
    2021-02-05 11:22

    The selected answer missing some details:

    It should be test: '/\.(js|jsx)$/', replaced with test: /\.js|\.jsx$/

    \: is an escape character in this case for .

    |: is an Alternation / OR operand

    $: is end of line

    Hopefully this is useful for you.

    Source: https://www.rexegg.com/regex-quickstart.html

提交回复
热议问题