daisy
daisy

Reputation: 23581

Import both regular and solid icon with vue-fontawesome

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?

Upvotes: 5

Views: 953

Answers (1)

tony19
tony19

Reputation: 138666

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

Upvotes: 5

Related Questions