Closed dannyshaw closed 5 years ago
It is expected, you can find notes about this here https://github.com/css-modules/postcss-modules-values/releases/tag/v3.0.0, before updating you can prefix all @value
(for example @value v-white from colors;
) and when do upgrade. Now @value
can be used in selector
.
Thanks for the response.
I was looking specifically for breaking change warnings about the fact that this upgrade can and did break the project's styles.
We backed out of upgrading because it's just too big a task to go look through every css module file and look to see if there are clashes between values and class names in a very large code base. Potentially we could regex rename but it would be a loose replacement that would need to be hand-checked for every occurrence.
@alexander-akait I just hit this when a the latest version got pulled into our dependency tree and spent half a day trying to track down why builds were suddenly failing. This change is really disappointing, especially since https://github.com/css-modules/postcss-modules-values/pull/2 didn't provide any rationale or justification for why this change was made. Is that rationale or any alternatives documented anywhere? Would you consider a PR reverting this change under a new major version, or at least allowing a config option to opt out of this behavior? Unfortunately it's not feasible for us to make the suggested change (rename with a prefix) across dozens of apps and thousands of files.
Moving from version 2.0.0 to 3.0.0 caused issues with clashes between imported colors, and local CSSModule selector names.
2.0.0 caused output:
3.0.0 caused output
I'm sure you're aware of this issue and perhaps why the version bump was major? I couldn't find any release notes warning of this potential breaking change so figured I'd create a note here for others who may be experiencing the same issue to find.