Repository navigation
Preserve declaration sources in JavaScript keyframes - #20710
darrenfdes wants to merge 2 commits into
Conversation
[Medium impact] The PR appears safe to merge. Reviews (7) · Last reviewed commit: "Preserve individual declaration sources ..." · Reviewed by Greptile |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
6e56111 to
55af614
Compare
|
I rebased this PR on the latest Sent by an AI assistant on behalf of @RobinMalfait. |
Summary
When a JavaScript config defines keyframes,
@tailwindcss/postcssemits their declarations without source locations in development. Vite then logs its missingfromwarning.Preserve each property's source through config merging and CSS-in-JS conversion. If a second config extends an animation, declarations retained from the first config keep their original source file. This also preserves the directory Vite uses to resolve their relative asset URLs.
Related to #20452. Supersedes #20709.
Test plan
pnpm exec vitest run --hideSkippedTests— 5,917 passed, 1 skipped across 84 files.pnpm exec vitest run packages/tailwindcss/src/compat packages/@tailwindcss-postcss/src --hideSkippedTests— 213 passed./asset.svgwhen another config extends the animation from a nested directory.git diff --check, andnode scripts/changelog.mjs checkpass.