|
@@ -27,19 +27,19 @@ module.exports = {
|
|
|
.set('@store', resolve('src/store'))
|
|
|
.set('@jsonData', resolve('src/jsonData'));
|
|
|
// 压缩图片
|
|
|
- // if (IS_PROD) {
|
|
|
- // config.module
|
|
|
- // .rule("images")
|
|
|
- // .use("image-webpack-loader")
|
|
|
- // .loader("image-webpack-loader")
|
|
|
- // .options({
|
|
|
- // mozjpeg: { progressive: true, quality: 65 },
|
|
|
- // optipng: { enabled: false },
|
|
|
- // pngquant: { quality: [0.65, 0.9], speed: 4 },
|
|
|
- // gifsicle: { interlaced: false }
|
|
|
- // // webp: { quality: 75 }
|
|
|
- // });
|
|
|
- // }
|
|
|
+ if (IS_PROD) {
|
|
|
+ config.module
|
|
|
+ .rule("images")
|
|
|
+ .use("image-webpack-loader")
|
|
|
+ .loader("image-webpack-loader")
|
|
|
+ .options({
|
|
|
+ mozjpeg: { progressive: true, quality: 65 },
|
|
|
+ optipng: { enabled: false },
|
|
|
+ pngquant: { quality: [0.65, 0.9], speed: 4 },
|
|
|
+ gifsicle: { interlaced: false }
|
|
|
+ // webp: { quality: 75 }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
css: {
|
|
|
loaderOptions: {
|