5

I'm trying to import both solid and regular icons

import { 
    faFile
} from '@fortawesome/free-solid-svg-icons'

import {
    faFile
} from '@fortawesome/free-regular-svg-icons'

But faFile cannot be defined again, what should I do?

1 Answer 1

5

You can rename the import:

import { 
  faFile as faFileSolid
} from '@fortawesome/free-solid-svg-icons'

import {
  faFile as faFileRegular
} from '@fortawesome/free-regular-svg-icons'

demo

Sign up to request clarification or add additional context in comments.

1 Comment

We love you tony

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.