Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

wardpeet/babel-plugin-react-icons

Repository files navigation

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"]
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published