Skip to main content
FarmFarm
Version: 2.x (Latest)
On this page

@farmfe/plugin-sass

Support Sass for Farm.

Installation

javascript
npm install @farmfe/plugin-sass
javascript
yarn add @farmfe/plugin-sass
javascript
pnpm add @farmfe/plugin-sass

Usage

@farmfe/plugin-sass is a Rust plugin. Import its default export and call it inside the plugins array of farm.config.ts.

ts
import { UserConfig } from '@farmfe/core';
import sass from '@farmfe/plugin-sass';

const config: UserConfig = {
  plugins: [sass({ /** options here */ })]
}

Options

additionalData

  • Type: string

Add extra content to the head of each sass file, such as an @import '@/styles/variables.scss'; statement.

100%

Drag or pinch to explore. Keyboard: + / − zoom, arrows pan, 0 resets, Esc closes.