Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@farmfe/js-plugin-svgr

Package Overview
Dependencies
Maintainers
3
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@farmfe/js-plugin-svgr

support svgr compile for farm.

latest
Source
npmnpm
Version
1.10.0
Version published
Maintainers
3
Created
Source

English | 简体中文

Svgr Plugin for Farm

Support compiling Svg as React components in Farm.

Getting Started

To begin, you'll need to @farmfe/js-plugin-svgr:

npm install @farmfe/js-plugin-svgr --save-dev

or

yarn add -D @farmfe/js-plugin-svgr

or

pnpm add -D @farmfe/js-plugin-svgr

Configuring the plugin in farm.config.ts:

import { UserConfig } from '@farmfe/core';
import svgr from '@farmfe/js-plugin-svgr'; //  import the plugin

function defineConfig(config: UserConfig) {
  return config;
}

export default defineFarmConfig({
  compilation: {
    input: {
      index: './index.html'
    },
    output: {
      path: './build'
    }
  },
  plugins: [
    // use the svgr plugin.
    svgr({
      // custom options here
    })
  ]
});

Options

  • svgrOptions

svgrOptions

refer to https://react-svgr.com/docs/options

FAQs

Package last updated on 16 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts