1. yarn add image-webpack-loader -D yarn add pngquant-bin -D 2. cnpm i image-webpack-loader --save-dev