A plugin for libuild to transform your svg to react component
// libuild.config.ts
import { defineConfig } from '@modern-js/libuild';
import { svgrPlugin } from '@modern-js/libuild-plugin-svgr';
export = defineConfig({
plugins:[
svgrPlugin( { /* options here */ })
]
})
The include option is a glob pattern to match the svg files you want to transform, default is /\.(svg)$/
The exclude option is a glob pattern to match the svg files you don't want to transform, default is undefined
See here for svgr options