@farmfe/js-plugin-sass
Support sass for Farm.
Installation
- npm
- yarn
- pnpm
Usage
Options
sassOptions
Sass options. See sass options for more details.
Example:
filters
Which files should be processed by sass. Default to { resolvedPaths: ['\\.(s[ac]ss)$'] } for load and { moduleTypes: ['sass'] } 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 sass. Default to sass. If you want to use sass-embedded, you can set it to sass-embedded.
You should install sass-embedded manually.
additionalData
Additional data to be added to every sass file. Example:
For sass file:
additionalData will be added to the top of the file:
Function form:
globals
Global sass files. These files will be added to the top of every sass file. It's the same as additionalData but more convenient.
