Importing a Stylus file as a CSS module in JavaScript or TypeScript:
import * as classes './style.module.styl';
document.body.className = classes.body;
Directly compiling Stylus using the Parcel CLI
parcel build style.styl
To configure Stylus, create a .stylusrc
file. To see the available options to configure stylus see the official Stylus documentation.