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(assets): make srcset parsing HTML spec compliant (#16323) #18242

Merged
merged 6 commits into from
Oct 7, 2024

Conversation

rarous
Copy link
Contributor

@rarous rarous commented Sep 30, 2024

fixes #16323

Description

Simplifies the spitting of srcset image candidates with descriptors, so it is compliant with spec and not driven by every edge case somebody finds out is not working.

Copy link

stackblitz bot commented Sep 30, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@rarous rarous changed the title fix(assets): Make srcset parsing HTML spec compliant (#16323) fix(assets): make srcset parsing HTML spec compliant (#16323) Sep 30, 2024
Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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

Thanks!

packages/vite/src/node/utils.ts Show resolved Hide resolved
packages/vite/src/node/utils.ts Show resolved Hide resolved
@sapphi-red sapphi-red added feat: html p3-minor-bug An edge case that only affects very specific usage (priority) labels Oct 1, 2024
@rarous
Copy link
Contributor Author

rarous commented Oct 1, 2024

HMR tests on Node 22 are a bit brittle :-/ The failure is unrelated to my changes and possible race condition/context leaking. I got another error on my machine just in the first run of tests. All consecutive runs were ok.

 FAIL  playground/hmr/__tests__/hmr.spec.ts > soft invalidate
AssertionError: expected 'soft-invalidation/index.js is transfo…' to match 'soft-invalidation/index.js is transfo…'

Expected: "soft-invalidation/index.js is transformed 2 times. child is now updated?"
Received: "soft-invalidation/index.js is transformed 3 times. child is now updated?"

Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

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

Nice!

@patak-dev patak-dev merged commit 0e6d4a5 into vitejs:main Oct 7, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: html p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vite adds spaces after commas in image url within srcset (HTML files)
3 participants