react-css-modules-loader
v0.0.1
Published
A cheap and convenient way to transforms React className to local-scope identity
Downloads
9
Maintainers
Readme
npm install --save-dev react-css-modules-loader
Configuration
webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.(jsx|js)$/,
use: ['babel-loader', 'react-css-modules-loader']
},
{
test: /\.(css)$/,
use: ['css-loader']
}
]
}
}
Examples
Input
import styles from 'index.css'
<div className="App">
<div className="navbar" />
</div>
Output
import styles from 'index.css'
<div className="App">
<div className="navbar" />
</div>
| Name | Defaults | Description |
|:----:|:--------:|-------------|
| styleMap
| styles
| Name of style export object |