FortAwesome / react-fontawesome

Font Awesome React component
https://fontawesome.com
MIT License
3.68k stars 265 forks source link

Warnings importing font awesome with react #439

Closed jovi-tsx closed 2 years ago

jovi-tsx commented 3 years ago

I created my project using create-react-app and keeps returning these warnings when I import any of FortAwesome libs

Errors:

[...]/frontend/node_modules/process/browser.js
There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
(webpack)/buildin/global.js
There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.

Icon.jsx:

import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { library } from "@fortawesome/fontawesome-svg-core"
import { fas } from "@fortawesome/free-solid-svg-icons"
import { far } from "@fortawesome/free-regular-svg-icons"

library.add(fas, far)

const Icon = props => (
    <FontAwesomeIcon icon={[props.type || 'fas', props.name]}/>
)

export default Icon
robmadole commented 2 years ago

@projohnz if you can provide a reproducible test case we'll take a look. Closing until that time.