Skip to main content

@farmfe/js-plugin-less

Support less for Farm.

Installation

Usage

Options

lessOptions

Less options. See less options.

Example:

filters

Which files should be processed by less. default to { resolvedPaths: ['\\.less$'] } for load and { moduleTypes: ['less'] } for transform.

  • resolvedPaths: Only files under these paths will be processed. Support regex.
  • moduleTypes: Only files with these module types will be processed.

resolvedPaths and moduleTypes are unioned, which means files match any of them will be processed.

Example:

implementation

implementation package name of less. Default to less.

additionalData

Additional data to be added to every less file. Example:

For less file:

index.less

additionalData will be added to the top of the file:

index.less

Function form:

Extremely Fast Web Build Tool Written in Rust

Copyright © 2024 Farm Community. Built with Docusaurus.