Skip to content

CSS Loader, dashed to camelCase #163

@prionkor

Description

@prionkor

Hello,

How do we convert the dashed to camelcase for css class names? I usually do it in webpack.config.js file with the following..

{
loader: 'css-loader',
    options: {
        camelCase: true
    }
}

This doesn't work for me. Probably dva is using something else?

More details

Test.css

.auth-form{
    background: white;
    padding: 20px;
}

TestComponent.js


import style from './Test.css

render(){
    return <form className={style['auth-form']}> ... </form>
}

Need to be able to call style.authForm after import.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions