0

我试图在我的反应代码中使用一些图像

import stepper1 from '../assets/static/HomePage/stepper1.png'

但我在服务器运行时收到此错误:

ERROR in ./js/components/assets/static/HomePage/card11.jpg
Module parse failed: Unexpected character 'ي┐╜' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
 @ ./js/components/_components/HomeCards.js 29:0-60 83:15-23
 @ ./js/components/HomePage/HomePage.js
 @ ./js/components/HomePage/index.js
 @ ./js/app.js
 @ multi ./js/app.js
4

1 回答 1

1

这是因为 web-pack 需要 file-louder 来通过使用它工作的这个链接来处理具有大小的图像。

于 2019-05-25T19:51:38.300 回答