-
Notifications
You must be signed in to change notification settings - Fork 18
Add WebP support and update dependencies #486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 11 commits
f57f759
db240d6
50732ce
56120c3
d8070be
803eb39
17492e8
8ad12c8
90876fc
0a61e3b
fc805ae
c5fb607
eb5e0fa
13624d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| const path = require('path') | ||
| const ImageMinimizerPlugin = require('image-minimizer-webpack-plugin') | ||
| const svgoconfig = require('./svgo.config') | ||
| const { CleanWebpackPlugin } = require('clean-webpack-plugin') | ||
| const { WebpackManifestPlugin } = require('webpack-manifest-plugin') | ||
| const ESLintPlugin = require('eslint-webpack-plugin') | ||
|
|
@@ -47,14 +49,29 @@ module.exports = { | |
| outputImageLocations: 'image-locations.json', // Output locations file name | ||
| outputImageSizes: 'image-sizes.json', // Output sizes file name | ||
| generateDefaultImages: true, // Generate default images | ||
| defaultImageSource: 'src/img/static/default.jpg', // Source image for generation | ||
| defaultImageSource: 'src/img/static/default.webp', // Source image for generation | ||
| defaultImagesOutputDir: 'dist/images', // Default images output directory | ||
| defaultImageFormat: 'jpg', // Generated image format (jpg, png, webp, avif) | ||
| defaultImageFormat: 'webp', // Generated image format (jpg, png, webp, avif) | ||
| silence: true, // Suppress console output | ||
| }), | ||
| ] | ||
|
|
||
| if (mode === 'production') { | ||
| plugins.push( | ||
| new ImageMinimizerPlugin({ | ||
| minimizer: { | ||
| implementation: ImageMinimizerPlugin.imageminMinify, | ||
| options: { | ||
| plugins: [ | ||
| ['gifsicle', { interlaced: true }], | ||
| ['jpegtran', { progressive: true }], | ||
| ['optipng', { optimizationLevel: 5 }], | ||
| ['svgo', { svgoconfig }], | ||
| ], | ||
| }, | ||
| }, | ||
| }) | ||
| ) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ImageMinimizerPlugin moved from optimization.minimizer to plugins arrayMedium Severity
Additional Locations (1)Reviewed by Cursor Bugbot for commit eb5e0fa. Configure here.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @firestar300 Le fait que t'as déplacé ça, le bugbot remonte ce soucis ? logique pour toi ? |
||
| plugins.push( | ||
| new BundleAnalyzerPlugin({ | ||
| analyzerMode: 'json', | ||
|
|
||
This file was deleted.
This file was deleted.


Uh oh!
There was an error while loading. Please reload this page.