Extension for CSS Modules, which supports
Search css modules
on the VS Code Marketplace.
Currently, this extension only support React project.
If you write kebab-case
classes in css files, but want to get camelCase
complete items, set following to true.
{
"cssModules.camelCase": true
}
Create aliases to import or require modules. (In combination with webpack resolve options.)
{
"cssModules.pathAlias": {
"@styles1": "${workspaceFolder}/src/styles1",
"styles2": "${workspaceFolder}/src/styles2"
}
}
If there is a jsconfig or tsconfig in your project, the compilerOptions.paths
will become aliases. For example
{
"baseUrl": "./src",
"paths": {
"@styles1/*": "styles1/*"
}
}
would allow to type
import * as styles1 from "@styles1/demo.css";
Feel free to submit any issues or pull request.
_________________
< The MIT License >
-----------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||