chore(ui): remove deprecated image-webpack-loader (#18923)

* remove gif support

* remove image-webpack-loader

* do not print file name to save build time
This commit is contained in:
Chirag Madlani 2024-12-04 23:21:33 +05:30 committed by GitHub
parent fb9bd00a44
commit 94e3b548bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 20 additions and 1098 deletions

View File

@ -204,11 +204,9 @@
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"fork-ts-checker-webpack-plugin": "6.5.0", "fork-ts-checker-webpack-plugin": "6.5.0",
"fs-extra": "^10.1.0", "fs-extra": "^10.1.0",
"gifsicle": "^7.0.1",
"html-webpack-plugin": "^5.5.0", "html-webpack-plugin": "^5.5.0",
"husky": "^8.0.1", "husky": "^8.0.1",
"i18next-json-sync": "^3.1.2", "i18next-json-sync": "^3.1.2",
"image-webpack-loader": "^8.1.0",
"jest": "^26.6.3", "jest": "^26.6.3",
"jest-sonar-reporter": "^2.0.0", "jest-sonar-reporter": "^2.0.0",
"less-loader": "^11.0.0", "less-loader": "^11.0.0",

View File

@ -113,24 +113,13 @@ module.exports = {
// Images to be handled by file-loader + image-webpack-loader // Images to be handled by file-loader + image-webpack-loader
{ {
test: /\.(png|jpe?g|gif)$/i, test: /\.(png|jpe?g)$/i,
use: [ use: [
{ {
loader: 'file-loader', loader: 'file-loader',
options: { options: {
name: 'images/[name].[contenthash].[ext]', // Output file naming name: 'images/[name].[contenthash].[ext]', // Output file naming
outputPath: 'images/', // Directory in the output folder outputPath: 'images/', // Directory in the output folder
publicPath: '/', // Public path used in the app
},
},
{
loader: 'image-webpack-loader',
options: {
mozjpeg: { progressive: true, quality: 75 },
optipng: { enabled: false },
pngquant: { quality: [0.65, 0.9], speed: 4 },
gifsicle: { interlaced: false },
webp: { quality: 75 }, // Modern image format support
}, },
}, },
], ],
@ -188,9 +177,7 @@ module.exports = {
// Plugins // Plugins
plugins: [ plugins: [
// Clean webpack output directory // Clean webpack output directory
new CleanWebpackPlugin({ new CleanWebpackPlugin(),
verbose: true, // Log removed files
}),
// Generate index.html from template // Generate index.html from template
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
@ -262,4 +249,4 @@ module.exports = {
// Disable source maps for production // Disable source maps for production
devtool: false, devtool: false,
}; };

File diff suppressed because it is too large Load Diff