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

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

    add a .babelrc file to the same folder where your node_modules folder is, with the below content

    {
      "presets": ["@babel/preset-react"]
    }
    

提交回复
热议问题