We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/hubcarl/easywebpack/blob/2dcd953fc93d21d3aada028250c598b5729207e3/config/plugin.js#L205
小图片我们会使用url-loader让它直接base64,但有一些图片压缩前很大,imagemin之后很小,这些文件如果用imagemin-webpack-plugin它不会base64,因为loader在plugin之前执行,url-loader limit比较的是压缩前的大小,发布出去发现有很多小图片
可以这样:
urlimage: { use: [ { loader: 'url-loader', options: { limit: 1024 * 5, fallback: 'file-loader', // img output path name: `img/[name].[hash:8].[ext]`, }, }, { loader: 'image-webpack-loader', }, ], },
The text was updated successfully, but these errors were encountered:
这个可以考虑,目前你可以项目webpack.config.js 配置中可以直接这样覆盖配置
Sorry, something went wrong.
No branches or pull requests
https://github.com/hubcarl/easywebpack/blob/2dcd953fc93d21d3aada028250c598b5729207e3/config/plugin.js#L205
小图片我们会使用url-loader让它直接base64,但有一些图片压缩前很大,imagemin之后很小,这些文件如果用imagemin-webpack-plugin它不会base64,因为loader在plugin之前执行,url-loader limit比较的是压缩前的大小,发布出去发现有很多小图片
可以这样:
The text was updated successfully, but these errors were encountered: