How to use react-icons properly? Fail on production

Viewed 15

I am using "react-icons": "^4.4.0" it is correctly installed in package.json and work perfect on localhost. I import them like this

import { GrGatsbyjs } from "react-icons/gr";

and using like that:

    <IconContext.Provider
  
      value={{ color: "#fff", size: '30px', display: "inlineblock"}}
    >
      <div>
< GrGatsbyjs />
</div>
    </IconContext.Provider>

on production I get tons of message

Module not found: Can't resolve 'react-icons/Tb' in '/vercel/path0/components/custom/sections'
09:23:55.996    

I try to solve it in many ways: import { GrGatsbyjs } from "react-icons/lib/gr" || import { GrGatsbyjs } from "react-icons/lib/gr/gatsbyjs || import { GrGatsbyjs } from "react-icons/all-files/gr || import { GrGatsbyjs } from "react-icons/all-files/gr/Gatsbyjs but all my ideas do not work on local so I do not even try to production.

0 Answers
Related