-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add ?
to resourceQuery
for Consistency with interpolateName
Behavior
#102
Conversation
Another commit has been submitted Fix Data Corruption Issue for Binary ResourcesDetails:
Steps to Verify the Fix:
Motivation: Ensuring correct handling of binary data is critical for the plugin's reliability, particularly for workflows involving binary resources such as images. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
just locked pnpm version to |
@oe Thank you so much! I'll merge the PR and release version v1.0.0 to prevent automatic upgrades to breaking changes. |
Awesome! |
@oe I totally agree with you, but during local testing, I noticed that |
This PR introduces a modification to the
resourceQuery
behavior by adding support for?
, ensuring consistency with the behavior outlined in webpack/loader-utils#interpolateName.Additionally, this PR resolves a specific issue related to optional query parameters in
include
matching rules.Details:
Feature Addition:
?
inresourceQuery
.resourceQuery
handling with the behavior of theinterpolateName
function, improving predictability and usability for developers.Issue Fix:
include
rules caused incorrect file name generation.include
rule like/\.png(\?.+)?/
andname
value[name].[ext]?[query]
:"xxx.png"
previously generated an invalid file name:xxx.png?
.name
to[name].[ext][query]
resolves the issue and produces the correct output.Breaking Changes:
This PR introduces a non-backward-compatible change by no longer supporting configurations relying on the previously incorrect file name generation (
xxx.png?
). Users with such configurations will need to update theirname
value to[name].[ext][query]
.Motivation:
Ensuring consistency across related functionalities and resolving file name generation issues enhances the developer experience and eliminates potential confusion.