Ir para o conteúdo principal
Version: 3.9.2

📦 plugin-svgr

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

Instalação

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.

Configuração

Campos aceitos:

NomeTypePadrãoDescrição
svgrConfigobject{}The SVGR config options, forwarded as is

Configuração de exemplo

You can configure this plugin through plugin options.

Se você usar uma predefinição, configure este plugin através do opções de predefinição:

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