babel-plugin-import-css-module
solution for develop component with css module.
Usage
Install:
# npm
npm install babel-plugin-import-css-module --save-dev
# yarn
yarn add babel-plugin-import-css-module --dev
Add babel plugin:
{
"plugin": [
[
[
"import-css-module",
{
"rule": "\\.pcss$"
}
]
]
]
}
Example
import styles, { liberty } from './mascot.css';
import './mascot.css';
import styles, { liberty } from './mascot.css.json';
License
MIT