Closed feiyujia closed 4 years ago
Docker 环境缺少相关依赖,导致 imagemin-webpack-plugin 图片压缩失败,Docker File 无法正常执行,需要手动操作
RUN apk --no-cache --virtual build-dependencies add \ python \ make \ g++ \ autoconf \ libpng-dev \ libtool \ automake \ nasm \
&& curl -O https://www.lcdf.org/gifsicle/gifsicle-$GIFSICLE_VERSION.tar.gz \ && tar zxf gifsicle-$GIFSICLE_VERSION.tar.gz \ && cd gifsicle-$GIFSICLE_VERSION \ && cnpm install
https://www.yuque.com/easy-team/easywebpack/problem
// ${app_root}/webpack.config.js module.exports= { plugins :{ imagemini: false } };
目前问题
Docker 环境缺少相关依赖,导致 imagemin-webpack-plugin 图片压缩失败,Docker File 无法正常执行,需要手动操作
目前解法 ,Docker 环境安装 imagemin-webpack-plugin 相关依赖
RUN apk --no-cache --virtual build-dependencies add \ python \ make \ g++ \ autoconf \ libpng-dev \ libtool \ automake \ nasm \
gifsicle
&& curl -O https://www.lcdf.org/gifsicle/gifsicle-$GIFSICLE_VERSION.tar.gz \ && tar zxf gifsicle-$GIFSICLE_VERSION.tar.gz \ && cd gifsicle-$GIFSICLE_VERSION \ && cnpm install