【已解决】webpack 打包时报错:Can't resolve './map/MapContainer' in 'C:\Users\18100\Desktop\text\src'

原因:

       没找到 './map/MapContainer' 。

解决:

        1.检查 import 时地址是否错误。

        2. 引入时添加文件后缀,即 .jsx,例如

import MapContainer from './map/MapContainer.jsx';

以上。

猜你喜欢

转载自blog.csdn.net/Ja_time/article/details/89406621