1.4.0 • Published 14 days ago

@farmfe/js-plugin-svgr v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
14 days ago

Svgr Plugin for Farm

Support compiling Svg as React components in Farm.

Getting Started

To begin, you'll need to @farmfe/js-plugin-svgr:

npm install @farmfe/js-plugin-svgr --save-dev

or

yarn add -D @farmfe/js-plugin-svgr

or

pnpm add -D @farmfe/js-plugin-svgr

Configuring the plugin in farm.config.ts:

import { UserConfig } from '@farmfe/core';
import svgr from '@farmfe/js-plugin-svgr'; //  import the plugin

function defineConfig(config: UserConfig) {
  return config;
}

export default defineFarmConfig({
  compilation: {
    input: {
      index: './index.html'
    },
    output: {
      path: './build'
    }
  },
  plugins: [
    // use the svgr plugin.
    svgr({
      // custom options here
    })
  ]
});

Options

svgrOptions

refer to https://react-svgr.com/docs/options

1.4.0

14 days ago

1.3.1

1 month ago

1.3.0

2 months ago

1.2.0

3 months ago

1.1.0

4 months ago

1.0.0

6 months ago

0.1.0

6 months ago

0.0.2

7 months ago