IMAGE: You may need an appropriate loader to handle this file type

后端 未结 4 1302
温柔的废话
温柔的废话 2020-12-05 17:45

I can\'t figure what is the proper loader to load images in ReactJS webpack,

May you give me a hand? I get this error:

Module parse failed: /Users/im         


        
4条回答
  •  执念已碎
    2020-12-05 18:17

    Sometimes the solution is simpler and right in front of you.

    I immediatly started to google for this issue. But I was missing jpg extention in the test.

    So.. my test is:

    test: /.(png|woff(2)?|eot|ttf|svg|gif|jpe?g)(\?[a-z0-9=\.]+)?$/

提交回复
热议问题