npm i -D postcss-modules
// ./.postcssrc
{
"modules": true,
"plugins": {
"postcss-modules": {
"camelCase": true
}
}
}
/* ./main.css */
.post-title {
color: blue;
}
// ./main.js
import { postTitle } from './main.css'
console.log(postTitle)