Stylus preprocessor for CSS Modules required via css-modules-require-hook or babel-plugin-css-modules-transform.
import hook from 'css-modules-require-hook';
import stylus from 'css-modules-stylus';
hook({
preprocessCss: stylus
});
Passing options to stylus can be done by creating a default stylus instance using .defaults()
.
import { defaults as stylus } from 'css-modules-stylus';
hook({
preprocessCss: stylus({
use: [ plugin() ]
})
});
.babelrc
{
"plugins": [
["css-modules-transform", {
"preprocessCss": "css-modules-stylus"
}]
]
}
contents
String The contents of the stylus file.filename
String The filename of the stylus file.
options
Object Stylus Renderer options.
Copyright (c) 2017 9Technology