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(generate): Replace + with \x00 #10

Merged
merged 1 commit into from Oct 24, 2020

Conversation

benmvp
Copy link
Contributor

@benmvp benmvp commented Oct 23, 2020

Problem

This PR changed the content being passed to interpolateName (in loader-utils) from including a plus + to including \x00. This is now in css-loader >= 4. However, generic-names still using + so there's now an inconsistency in how the class names are generated.

Given that this library is basically piggybacking on what webpack does, it should be updated to match.

This caused babel-plugin-react-css-modules to break: gajus/babel-plugin-react-css-modules#291

Solution

Use \x00 instead of + and update the tests.

Fixes #8.

BREAKING CHANGE: This change will result in new names being generated, particularly those using [hash]. You will need to upgrade to css-loader >= 4 if you are wanting to keep the classes in sync.

@alexander-akait alexander-akait merged commit 191c17e into css-modules:master Oct 24, 2020
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.

inconsistency with css-loader
2 participants