FortAwesome / vue-fontawesome

Font Awesome Vue component
https://fontawesome.com
MIT License
2.39k stars 132 forks source link

Upgrading from 6.0.0 to 6.1.0 broke vue-awesome #357

Closed 2-5 closed 2 years ago

2-5 commented 2 years ago

This code broke when upgrading from 6.0.0 to 6.1.0:

import Vue from "vue"

import { library } from "@fortawesome/fontawesome-svg-core"
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"

import {
  faPlus,
} from "@fortawesome/free-solid-svg-icons"

library.add(
  faPlus,
)

Vue.component("FontAwesomeIcon", FontAwesomeIcon)

The error is:

ERROR in ./src/components/register/font_awesome.ts 12:3-9
TS2345: Argument of type 'IconDefinition' is not assignable to parameter of type 'IconDefinitionOrPack'.
  Type 'IconDefinition' is not assignable to type 'IconPack'.
    Index signature for type 'string' is missing in type 'IconDefinition'.
    10 |
    11 | library.add(
  > 12 |   faPlus,
       |   ^^^^^^
robmadole commented 2 years ago

Hi @2-5 did you upgrade all dependencies to 6.1.0?

2-5 commented 2 years ago

You are correct, one package was not updated.