Skip to content
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

Fix webp and avif support, test asset loading in fixture #1181

Merged
merged 3 commits into from
Feb 21, 2025

Conversation

askoufis
Copy link
Contributor

Looks like some changes from #1119 got missed when the change was merged into the v14 branch, so webpack currently fails to load webp and avif images.

I've added the missing changes, as well avif support for the jest file mock. Additionally, each supported image format is now tested within the public-path fixture.

@askoufis askoufis requested a review from a team as a code owner February 18, 2025 02:55
Copy link

changeset-bot bot commented Feb 18, 2025

🦋 Changeset detected

Latest commit: 594d09e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
sku Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@askoufis askoufis enabled auto-merge (squash) February 21, 2025 05:28
@askoufis askoufis merged commit 1f81ad8 into master Feb 21, 2025
4 checks passed
@askoufis askoufis deleted the webp-avif-support branch February 21, 2025 05:33
@seek-oss-ci seek-oss-ci mentioned this pull request Feb 21, 2025
@@ -27,7 +27,7 @@ export default jestDecorator({
],
moduleFileExtensions: ['js', 'json', 'ts', 'tsx'],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|svg)$':
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|svg|avif)$':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Should bmp be in here as well?

Is it ok to load a bmp without a filemock?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, didn't notice that it was missing. Automerge beat you to it. I'll make another PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll ✅ that when it shows up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants