Fix des images par défauts qui se supprimaient dans dist/images/#469
Merged
firestar300 merged 1 commit intomasterfrom Jan 13, 2026
Merged
Fix des images par défauts qui se supprimaient dans dist/images/#469firestar300 merged 1 commit intomasterfrom
dist/images/#469firestar300 merged 1 commit intomasterfrom
Conversation
Configures CleanWebpackPlugin to preserve the images directory and its contents during the cleaning process. This prevents the deletion of images when cleaning the dist folder.
Reviewer's GuideAdds configuration to CleanWebpackPlugin so that the dist/images directory and its contents are preserved during builds, preventing default images from being deleted, with no behavioral changes to other Webpack plugins. Sequence diagram for Webpack build with preserved dist/imagessequenceDiagram
actor Developer
participant Webpack
participant CleanWebpackPlugin
participant WebpackImageSizesPlugin
participant DistFolder as dist
participant ImagesFolder as dist_images
Developer->>Webpack: run build
Webpack->>CleanWebpackPlugin: initialize with patterns
CleanWebpackPlugin->>DistFolder: remove files matching **/*
CleanWebpackPlugin-->>ImagesFolder: skip images and images/**
CleanWebpackPlugin-->>Webpack: cleaning complete
Webpack->>WebpackImageSizesPlugin: run plugin
WebpackImageSizesPlugin->>ImagesFolder: generate default images
WebpackImageSizesPlugin-->>Webpack: generation complete
Webpack-->>Developer: build finished with images preserved
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- The change from two-space indentation to tabs in
config/plugins.jsmakes the file formatting inconsistent with the previous style; consider reverting to the original indentation to keep the file uniform. - The CleanWebpackPlugin exclusion
['**/*', '!images', '!images/**']will preserve the entireimagesdirectory and all its contents; if the goal is only to protect specific default assets, consider narrowing the pattern to those files (e.g.,!images/default-*.jpg) to avoid retaining stale or unused images between builds.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The change from two-space indentation to tabs in `config/plugins.js` makes the file formatting inconsistent with the previous style; consider reverting to the original indentation to keep the file uniform.
- The CleanWebpackPlugin exclusion `['**/*', '!images', '!images/**']` will preserve the entire `images` directory and all its contents; if the goal is only to protect specific default assets, consider narrowing the pattern to those files (e.g., `!images/default-*.jpg`) to avoid retaining stale or unused images between builds.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
MarieComet
approved these changes
Dec 29, 2025
francoistibo
approved these changes
Jan 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Ce fix apporte une configuration sur le plugin CleanWebpackPlugin pour préserver le dossier images et ses contenus durant le processus. Cela évite la suppression des images par défaut notamment.
Lignes réellement modifiées
Summary by Sourcery
Bug Fixes: