@modern-js/libuild-plugin-svgr
TypeScript icon, indicating that this package has built-in type declarations

2.35.1 • Public • Published

@modern-js/libuild-plugin-svgr

npm version

A plugin for libuild to transform your svg to react component

Usage

// libuild.config.ts
import { defineConfig } from '@modern-js/libuild';
import { svgrPlugin } from '@modern-js/libuild-plugin-svgr';

export = defineConfig({
  plugins:[
    svgrPlugin( { /* options here */ })
  ]
})

Options

include

The include option is a glob pattern to match the svg files you want to transform, default is /\.(svg)$/

exclude

The exclude option is a glob pattern to match the svg files you don't want to transform, default is undefined

other options

See here for svgr options

Readme

Keywords

Package Sidebar

Install

npm i @modern-js/libuild-plugin-svgr

Weekly Downloads

9

Version

2.35.1

License

MIT

Unpacked Size

8.41 kB

Total Files

11

Last publish

Collaborators

  • jserfeng
  • jingkai.zhao
  • sanyuan0704
  • derozan
  • xieqixuan.xx
  • shawzhou
  • chenjiahan
  • xuchaobei
  • webinfrabot
  • targeral
  • yimingjfe
  • caohuilin
  • kky_kongjiacong
  • bytednpm