because pictures are preloaded in js , the pictures in HTML use data-src instead of src . I found that url-loader didn"t process these pictures, and then I used html-loader and didn"t process them either.
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: "url-loader",
options: {
limit: 5120,
name: assetsPath("images/[name].[hash:7].[ext]")
}
},
{
test: /\.(htm|html)$/i,
loader: "html-loader?attrs=img:src img:data-src"
}
