Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vite-plugin): prevent extra style module invalidations when using PostCSS #1250

Merged

Conversation

kosmotema
Copy link
Contributor

Currently the CSS code that was processed with PostCSS (cssSource) is written to the cssMap cache:

cssMap.set(absoluteId, cssSource);

However, the invalidation uses the source code that was not processed by PostCSS (source):

cssMap.get(absoluteId) !== source

This results in unnecessary invalidation of those modules that may not have changed.

Copy link

changeset-bot bot commented Dec 7, 2023

🦋 Changeset detected

Latest commit: 5798d16

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@vanilla-extract/vite-plugin Patch

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

Copy link
Contributor

@askoufis askoufis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@askoufis askoufis merged commit bc349fd into vanilla-extract-css:master Dec 10, 2023
5 checks passed
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.

2 participants