fix: SSR scoped classes for <select value> elements#16821
fix: SSR scoped classes for <select value> elements#16821Rich-Harris merged 12 commits intosveltejs:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 449868d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
packages/svelte/src/compiler/phases/3-transform/server/visitors/RegularElement.js
Outdated
Show resolved
Hide resolved
|
Another bug from that PR is async attributes are awaited twice. I guess |
|
@7nik. Thanks for the review! I’ve applied all three points: – Added I’d value your thoughts. I’m happy to adjust if needed. |
packages/svelte/src/compiler/phases/3-transform/server/visitors/RegularElement.js
Outdated
Show resolved
Hide resolved
2dd8e2c to
b125ec0
Compare
|
@7nik Thanks for pointing that out! I had overlooked |
Fixes #16813
Server-rendered
<select>elements stopped getting their scoped CSS because the specialselectbranch skipped the hashing/directive merge. I pass the hash and directive data through to$$renderer.select, then let the existingattributes(...)helper merge them so the flow matches other elements. If there’s a better way to do this, I’m happy to adjust. Added a renderer unit test and an SSR sample to cover the regression.Before submitting the PR, please make sure you do the following
feat:,fix:,chore:, ordocs:.packages/svelte/src, add a changeset (npx changeset).Tests and linting
pnpm testand lint the project withpnpm lint