From 4e3ffe91fca6af26353af0fa5911508478da7a31 Mon Sep 17 00:00:00 2001 From: wang1212 Date: Wed, 5 Jan 2022 23:43:22 +0800 Subject: [PATCH] build(templates): `image-webpack-loader` is not enabled by default :heavy_minus_sign: --- templates/app/config/webpack.config.js | 47 ++++++++++---------- templates/app/package.json | 1 - templates/react-app/config/webpack.config.js | 47 ++++++++++---------- templates/react-app/package.json | 1 - 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/templates/app/config/webpack.config.js b/templates/app/config/webpack.config.js index 9d8ba2d..523df73 100644 --- a/templates/app/config/webpack.config.js +++ b/templates/app/config/webpack.config.js @@ -197,29 +197,30 @@ module.exports = ({ NODE_ENV, SRC_DIR, BUILD_DIR, isEnvDevelopment = NODE_ENV == // }, // }, use: [ - { - loader: 'image-webpack-loader', - options: { - disable: isEnvDevelopment, - mozjpeg: { - progressive: true, - quality: 65, - }, - optipng: { - enabled: false, - }, - pngquant: { - quality: [0.65, 0.9], - speed: 4, - }, - gifsicle: { - interlaced: false, - }, - webp: { - quality: 75, - }, - }, - }, + // install https://github.com/tcoopman/image-webpack-loader#install + // { + // loader: 'image-webpack-loader', + // options: { + // disable: isEnvDevelopment, + // mozjpeg: { + // progressive: true, + // quality: 65, + // }, + // optipng: { + // enabled: false, + // }, + // pngquant: { + // quality: [0.65, 0.9], + // speed: 4, + // }, + // gifsicle: { + // interlaced: false, + // }, + // webp: { + // quality: 75, + // }, + // }, + // }, ], }, ], diff --git a/templates/app/package.json b/templates/app/package.json index 4d91cae..b61b211 100644 --- a/templates/app/package.json +++ b/templates/app/package.json @@ -62,7 +62,6 @@ "html-loader": "^2.1.2", "html-webpack-plugin": "^5.3.2", "husky": "^7.0.2", - "image-webpack-loader": "^7.0.1", "jest": "^27.1.0", "jsdoc": "^3.6.7", "jsdoc-babel": "^0.5.0", diff --git a/templates/react-app/config/webpack.config.js b/templates/react-app/config/webpack.config.js index d781409..540e965 100644 --- a/templates/react-app/config/webpack.config.js +++ b/templates/react-app/config/webpack.config.js @@ -199,29 +199,30 @@ module.exports = ({ NODE_ENV, SRC_DIR, BUILD_DIR, isEnvDevelopment = NODE_ENV == // }, // }, use: [ - { - loader: 'image-webpack-loader', - options: { - disable: isEnvDevelopment, - mozjpeg: { - progressive: true, - quality: 65, - }, - optipng: { - enabled: false, - }, - pngquant: { - quality: [0.65, 0.9], - speed: 4, - }, - gifsicle: { - interlaced: false, - }, - webp: { - quality: 75, - }, - }, - }, + // install https://github.com/tcoopman/image-webpack-loader#install + // { + // loader: 'image-webpack-loader', + // options: { + // disable: isEnvDevelopment, + // mozjpeg: { + // progressive: true, + // quality: 65, + // }, + // optipng: { + // enabled: false, + // }, + // pngquant: { + // quality: [0.65, 0.9], + // speed: 4, + // }, + // gifsicle: { + // interlaced: false, + // }, + // webp: { + // quality: 75, + // }, + // }, + // }, ], }, ], diff --git a/templates/react-app/package.json b/templates/react-app/package.json index 626333e..7a215ec 100644 --- a/templates/react-app/package.json +++ b/templates/react-app/package.json @@ -77,7 +77,6 @@ "html-loader": "^2.1.2", "html-webpack-plugin": "^5.3.2", "husky": "^7.0.2", - "image-webpack-loader": "^7.0.1", "jest": "^27.1.0", "jsdoc": "^3.6.7", "jsdoc-babel": "^0.5.0",