Skip to content

Invalid "+" symbol generated in getCSSModuleLocalIdent #12048

Closed
@yangjocy

Description

@yangjocy

Dup of #11775.

Describe the bug

The output of getCSSModuleLocalIdent() in react-dev-utils might include invalid + symbol, like 'SidePanel_slideIn__xwW+q'. That would invalidate corresponding CSS classes and cause style error.

Did you try recovering your dependencies?

Yes.

Environment

react-dev-utils: v12.0.0, the lastest

Steps to reproduce

It is difficult to reproduce because the class-names are auto-generated.

Expected behavior

+ as in class names is removed.

Actual behavior

The symbol is there. screenshot

I'd be happy to submit a PR if this makes sense and I didn't miss something obvious. Thank you!

Activity

mikeaustin

mikeaustin commented on Feb 12, 2022

@mikeaustin

This was originally reported for css-loader, since I thought it was using the default localName generator.

webpack-contrib/css-loader#1414

pstrh

pstrh commented on Feb 14, 2022

@pstrh

@yangjocy I think this is a duplicate of #11775. I submitted a PR #12013 to fix it.

yangjocy

yangjocy commented on Feb 15, 2022

@yangjocy
Author

@pstrh Thanks for reminding, I'll link them and close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mikeaustin@yangjocy@pstrh

        Issue actions

          Invalid "+" symbol generated in getCSSModuleLocalIdent · Issue #12048 · facebook/create-react-app