A vscode extension for css-modules language server.
add module config in style, also support import other style file from local or node_modules
<style lang="less" module>
@import './out.modules.less';
@import '~test/index';
.ap-lk {
color: red;
}
.ap-lk {
color: red;
}
</style>
support autocomplete for $style in template
support autocomplete for $style in script and support es module style
in vue sfc file
goto style file
module.exports = {
css: {
sourceMap: true,
loaderOptions: {
css: {
camelCase: true,
}
}
},
}
{
loader: require.resolve('css-loader'),
options: {
modules: true,
namedExport: true,
camelCase: true,
},
}
The behavior is the same as less loader webpack resolver.
You can import your Less modules from node_modules
. Just prepend them with a ~
which tells extension to look up the [modules
].
@import "~bootstrap/less/bootstrap";
Specifies the root directory of input files relative to project workspace, including js, ts, css, less. Defaults to ., you can set /src.
Export Classnames in camelOnly or dashesOnly.
Glob for files to watch and scan. Defaults to */.{less,css}.
Glob for files to watch and scan. Defaults to */.{js,ts,jsx,tsx}
Specifies the node_modules directory. Defaults to ./node_modules. See Imports.
enable diagnostic, Defaults to true