Skip to content

fix(html): cache unfiltered CSS list to prevent missing styles across entries#22017

Merged
sapphi-red merged 1 commit into
vitejs:mainfrom
sapphi-red:fix/html-css-cache-missing-shared-css
Mar 25, 2026
Merged

fix(html): cache unfiltered CSS list to prevent missing styles across entries#22017
sapphi-red merged 1 commit into
vitejs:mainfrom
sapphi-red:fix/html-css-cache-missing-shared-css

Conversation

@sapphi-red

Copy link
Copy Markdown
Member

Updated version of #21298

I added a test for #21298 and also added a test case that fails with #21298. I fixed the bug in the implementation of #21298

This bug was one of the reason of the flaky failure: https://github.com/vitejs/vite/actions/runs/23434192835/job/68171680224?pr=21998#step:13:26

 FAIL  playground/html/__tests__/html.spec.ts > nested > css
 FAIL  playground/html/__tests__/html.spec.ts > nested w/ query > css
AssertionError: expected 'black' to be 'grey' // Object.is equality

Expected: "grey"
Received: "black"

 ❯ playground/html/__tests__/html.spec.ts:84:33
     82|   test('css', async () => {
     83|     expect(await getColor('h1')).toBe(isNested ? 'red' : 'blue')
     84|     expect(await getColor('p')).toBe('grey')
       |                                 ^
     85|   })
     86|

close #21298
refs rolldown/rolldown#8834

Loading
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.

1 participant