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

@farmfe/plugin-yaml

Inspired By @rollup/plugin-yaml

🍣 A Farm plugin which Converts YAML files to ES6 modules.

Installation

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

Usage

farm.config.ts

typescript
import { defineConfig } from '@farmfe/core';
import yaml from '@farmfe/plugin-yaml';

export default defineConfig({
  plugins: [
    yaml({
      documentMode: 'single' | 'multi', // default single
      include: Regex, // default None,
      exclude: Regex, // default None
    }),
  ],
});

notice:

include or exclude is Regex not glob For example **/01.yaml is not illegal。What is right is like ".*\\/01.yaml"

100%

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