hejsfj
FontAwesome Import into island component not working as expected
Hey,
I want to use FontAwesome with a Fresh component inside my island folder.
I followed the following FontAwesome setup: https://fontawesome.com/docs/web/use-with/react/
I'm using Babel Macros for the setup as explained here: https://fontawesome.com/docs/web/use-with/react/add-icons
Inside my component.tsx:
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { icon } from '@fortawesome/fontawesome-svg-core/import.macro'
<FontAwesomeIcon icon={icon({name: 'coffee', style: 'solid'})} />
When running the code I get the following error message and I'm not quite sure why this happens.
error: Uncaught (in promise) SyntaxError: The requested module '@fortawesome/fontawesome-svg-core/import.macro' does not provide an export named 'icon' at file:///Users/hejsfj/GitHub/HEJSFJ/islands/Project.tsx:2:10
4 replies