feat(css): upgrade postcss-modules - #10987
Merged
Merged
Conversation
bluwy
approved these changes
Nov 19, 2022
benmccann
approved these changes
Nov 19, 2022
Contributor
Author
|
many thanks 🙇 |
Contributor
Author
|
any chance to backport to v3? I'm happy to do the work if so |
fc
pushed a commit
to fc/vite
that referenced
this pull request
Nov 23, 2022
Member
|
While we usually don't backport features back to v3, this does seem like a small change and fixes a bug, so maybe it's fine to backport this to the v3 branch. cc @patak-dev |
bluwy
pushed a commit
that referenced
this pull request
Nov 29, 2022
patak-cat
pushed a commit
that referenced
this pull request
Nov 30, 2022
* fix(config): exclude config.assetsInclude empty array (#10941) fixes #10926 * feat(css): upgrade postcss-modules (#10987) * fix(mpa): support mpa fallback (#10985) fixes #10966 * fix: export preprocessCSS in CJS (#11067) * chore: update license Co-authored-by: sun0day <sun_day500@163.com> Co-authored-by: Jason Quense <monastic.panic@gmail.com> Co-authored-by: sun0day <ivan.xu@applovin.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
resolveoptions. I passed the newimporterargument 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
@valuereferences 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).