feat(css): upgrade postcss-modules #10987
Merged
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.
Description
Upgrades the css-modules postcss plugin to the latest version. The upgrade is a major version but the change is not breaking in behavior (as far as I can tell) but an API change where this second argument is passed in to the
resolve
options. I passed the newimporter
argument to the vite resolvers, since that seems to be more correct HOWEVER, if we are very afraid of potential behavior changes i can ignore the option and fully ensure the change doesn't change anythingBeyond this option there are upgrades to the CSS module helpers that bring it's behavior up to date with other CSS module implementations (e.g. webpack's css-loader). Specifically Vite does not replace
@value
references in selectors when it should.Additional context
I am trying to build a proper astroturf plugin which depends on the selector replacement of CSS modules
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).