I installed react-icons library and tried this code
%%raw("import {BsHandsThumbsUp} from 'node_modules/react-icons/ba'")
I saw this in a tutorial on YouTube but that tutorial is just using javascript. I thought I could copy paste the code and just put %%raw on top of it. but it doesn’t work.
Rescript compiles it fine but webpack window immediately says Field 'browser' doesn't contain a valid alias configuration /Users/foo/code/Rescript/meals-app/src/components/react-icons/bs
I get an error export 'bs' (imported as 'ReactIcons') was not found in 'react-icons' (possible exports: DefaultContext, GenIcon, IconBase, IconContext, IconsManifest)
I can see that in node modules there is a react-icons directory and that contains a “bs” directory and inside that there is a file called index.js which does have the line
module.exports.BsHandThumbsUpFill = function BsHandThumbsUpFill
but somehow rescript doesn’t find the ‘bs’ export.
But I don’t fully understand what the actual package import path should look like. The initial example lists react-icons/ba, but then it turned into react-icons/bs.