@docusaurus-plugin/less
v0.1.1
Published
less plugin for docusaurus v2
Downloads
198
Readme
@docusaurus-plugin/less
support less in docusaurus
Support less stylesheet language in docusaurus v2.
Installation
- using npm
$ npm i @docusaurus-plugin/less less less-loader -D
- using yarn
$ yarn add @docusaurus-plugin/less less less-loader -D
How to use
Without less-loader options
// docusaurus.config.js module.exports = { // omit unrelated docusaurus options plugins: ['@docusaurus-plugin/less'] }
With less-loader options
// docusaurus.config.js module.exports = { plugins: [ '@docusaurus-plugin/less', { // less-loader options // https://github.com/webpack-contrib/less-loader#options } ] }
Regular less
// App.tsx
import './global.less'
Less CSS Modules
// Button.tsx
import styles from './button.module.less'
export default function Button({ children }) {
return <button classNames={styles.button}>{children}</button>
}