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