Webpack - Error: Cannot define 'query' and multiple loaders in loaders list

前端 未结 6 763
梦谈多话
梦谈多话 2021-01-30 16:28

This error appeared after I added the react-hot loader in an array following this tutorial: https://thoughtbot.com/blog/setting-up-webpack-for-react-and-hot-module-

6条回答
  •  天涯浪人
    2021-01-30 17:15

    I had faced the same issue since I found a solution for myself. you can try it:

    --- here is the solution ---

    If you've defined "presets" in ".babelrc" file then you don't need to specify it in the "webpack.config.js" file, then delete it and it works well


    and if you don't, I recommend you to go to your ".babelrc" file and specify your presets there

提交回复
热议问题