Skip to content

Latest commit

 

History

History
 
 

webpack3.5

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

CSS中的图片处理

依赖

npm i html-webpack-plugin@3.0.4 --save-dev

配置

module: {
    rules: [
        {
            test: /\.(png|jpg|gif)/,
            use: [{
                loader: 'url-loader',
                options:{
                    limit: 5000, // 小于5000字节的图片生成base64格式
                }
            }]
        }
    ]
}