| sidebar_position | 7 |
|---|---|
| slug | /api/plugins/@docusaurus/plugin-svgr |
import APITable from '@site/src/components/APITable';
An SVGR plugin to transform SVG files into React components automatically at build time.
npm install --save @docusaurus/plugin-svgr:::tip
If you use the preset @docusaurus/preset-classic, you don't need to install this plugin as a dependency.
You can configure this plugin through the preset options.
:::
Accepted fields:
<APITable>
| Name | Type | Default | Description |
|---|---|---|---|
svgrConfig |
object |
{} |
The SVGR config options, forwarded as is |
</APITable>
You can configure this plugin through plugin options.
// Preset Options: svgr
// Plugin Options: @docusaurus/plugin-svgr
const config = {
svgrConfig: {
/* SVGR config */
},
};