Skip to content

camelCase doesn't delete original names #368

Closed
@klimashkin

Description

@klimashkin

camelCase option adds new props to style object, not replaces original ones.

It causes dirt when used with https://github.com/javivelasco/react-css-themr.

For instance, if I have .back-button {...} class, css-loader with camelCase returns

{
   back-button: '...',
   backButton: '...'
}

And if that style object is passed to react-css-themr as theme={styles} themeNamespace='back', it transforms it to

{
   -button: '...',
   button: '...'
}

It doesn't make any sense. Is there any reasons why original class name is saved by css-loader?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions