1.6.0 • Published 8 months ago

@farmfe/js-plugin-svgr v1.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months 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.6.0

12 months ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

2 years ago

0.1.0

2 years ago

0.0.2

2 years ago