Socket
Book a DemoInstallSign in
Socket

babel-plugin-react-icons

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-react-icons

Modular react-icons builds without the hassle.

latest
npmnpm
Version
0.1.1
Version published
Weekly downloads
6
-45.45%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-react-icons

A simple transform to cherry-pick react-icons modules so you don’t have to.

Install

$ npm i --save @react-icons/all-files
$ npm i --save-dev babel-plugin-react-icons

Example

Transforms

import { Fa500Px, FaAccessibleIcon, FaAccusoft } from 'react-icons/fa';

roughly to

import { FaAccusoft as _FaAccusoft } from '@react-icons/all-files/fa/FaAccusoft.esm.js';
import { FaAccessibleIcon as _FaAccessibleIcon } from '@react-icons/all-files/fa/FaAccessibleIcon.esm.js';
import { Fa500Px as _Fa500Px } from '@react-icons/all-files/fa/Fa500Px.esm.js';

Usage

.babelrc
{
  "plugins": ["babel-plugin-react-icons"]
}

FAQs

Package last updated on 26 Nov 2020

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