对待css里的图片, 因为已经通过引入css文件到js,打包了,可以正常通过module.rules.test检测到,然后正常打包.

但是对于html里的图片, 这个需要安装一个插件html-withimg-loader,然后添加一个rules值

{
    test: /\.(htm|html)$/i,
     use:[ 'html-withimg-loader'] 
};

相关文章:

  • 2021-12-25
  • 2021-12-27
  • 2021-12-25
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-12-25
猜你喜欢
  • 2021-05-09
  • 2022-12-23
  • 2021-12-25
  • 2021-12-06
  • 2021-12-25
  • 2022-12-23
  • 2021-12-25
相关资源
相似解决方案