mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-25 23:17:06 +02:00
chore: release Docusaurus 3.7.0 (#10812)
This commit is contained in:
parent
cacb973326
commit
71d682c53b
153 changed files with 21809 additions and 232 deletions
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
sidebar_position: 7
|
||||
slug: /api/plugins/@docusaurus/plugin-svgr
|
||||
---
|
||||
|
||||
# 📦 plugin-svgr
|
||||
|
||||
import APITable from '@site/src/components/APITable';
|
||||
|
||||
An [SVGR](https://react-svgr.com/) plugin to transform SVG files into React components automatically at build time.
|
||||
|
||||
## Installation {#installation}
|
||||
|
||||
```bash npm2yarn
|
||||
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](../../using-plugins.mdx#docusauruspreset-classic).
|
||||
|
||||
:::
|
||||
|
||||
## Configuration {#configuration}
|
||||
|
||||
Accepted fields:
|
||||
|
||||
```mdx-code-block
|
||||
<APITable>
|
||||
```
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `svgrConfig` | `object` | `{}` | The [SVGR config options](https://react-svgr.com/docs/options/), forwarded as is |
|
||||
|
||||
```mdx-code-block
|
||||
</APITable>
|
||||
```
|
||||
|
||||
### Example configuration {#ex-config}
|
||||
|
||||
You can configure this plugin through plugin options.
|
||||
|
||||
```js config-tabs
|
||||
// Preset Options: svgr
|
||||
// Plugin Options: @docusaurus/plugin-svgr
|
||||
|
||||
const config = {
|
||||
svgrConfig: {
|
||||
/* SVGR config */
|
||||
},
|
||||
};
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue