Vite: Emit build dependencies on partial rebuilds #17347
Merged
+53
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
@import-ed CSS file can be updated even after a partial rebuild.