Skip to main content
버전: 3.10.2

📦 plugin-svgr

An SVGR plugin to transform SVG files into React components automatically at build time.

설치

npm install --save @docusaurus/plugin-svgr

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.

설정

설정할 수 있는 필드

옵션명타입기본값설명
svgrConfigobject{}The SVGR config options, forwarded as is

설정 예시

You can configure this plugin through plugin options.

프리셋을 사용하는 경우 프리셋 옵션를 통해 플러그인을 구성합니다.

docusaurus.config.js
module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
svgr: {
svgrConfig: {
/* SVGR config */
},
},
},
],
],
};