Importing a Sass/SCSS file as a CSS module in JavaScript or TypeScript:
import * as classes from './style.module.scss';
document.body.className = classes.body;
Directly compiling Sass/SCSS using the Parcel CLI:
parcel build style.scss
To configure Sass, create a .sassrc
or .sassrc.json
file. For a list of all options that you can define in these configuration files you can have a look at the official Sass documentation