javascripter / fontawesome.macro

Import fontawesome icons automatically with fas('smile') or fas`smile` using this babel macro
18 stars 2 forks source link

I can't import {fas} from fontawesome.macro #106

Open asoko2 opened 2 years ago

asoko2 commented 2 years ago

After i fix the module not found 'fs' error now i get this error ./node_modules/babel-plugin-macros/dist/index.js:9:0 Module not found: Can't resolve 'path'

javascripter commented 2 years ago

Sorry for the late reply. I'm aware that in some non-Node environments fs and path are not available, (in next.js and React Native), causing the error you mentioned.

I specifically tested this module with an app made with create-react-app, but unfortunately I no longer actively maintain this library as I now rely on TypeScript's auto-import functionality instead of using this library. PRs are welcome though :)