Skip to content

Conversation

@philipp-spiess
Copy link
Member

@philipp-spiess philipp-spiess commented Mar 24, 2025

Closes #17339

This PR fixes an issue that caused changes to @import-ed CSS files to no longer rebuild the stylesheet after a change was made to a template file.

The change in the template file causes a fast-path in the Vite plugin now after changes in 4.0.8: partial rebuilds. For that branch we do not need to re-evaluate your input CSS since we know only the candidate list changed. However, we still need to emit all build dependencies as via addWatchFile(…), otherwise Vite will not correctly register updates for these dependencies anymore.

Test plan

  • Updated the kitchen-sink Vite update tests to ensure that an @import-ed CSS file can be updated even after a partial rebuild.
  • Ensure this works in our Vite playground

@philipp-spiess philipp-spiess requested a review from a team as a code owner March 24, 2025 10:20
@philipp-spiess philipp-spiess force-pushed the fix/vite-emit-build-dependencies-on-partial-rebuild branch from e5abcc7 to 9661c99 Compare March 24, 2025 10:20
@philipp-spiess philipp-spiess merged commit fac8f7d into main Mar 24, 2025
6 checks passed
@philipp-spiess philipp-spiess deleted the fix/vite-emit-build-dependencies-on-partial-rebuild branch March 24, 2025 10:54
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.

Using @tailwindcss/vite breaks updates on imported CSS

3 participants