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

前端 未结 5 1882
独厮守ぢ
独厮守ぢ 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:28

    You are using unnecessary escape character: which is not required.

    Replace test: '/\.(js|jsx)$/', with test: /\.js$|jsx/, it should work fine.

    I replicated your issue in my machine and found the same which is resolved by the above fix.

    hope this helps, happy coding!!!

提交回复
热议问题