Skip to content

Vue-FA 3 with Vue 3 global #422

@CodelineRed

Description

@CodelineRed

Describe the bug
Hello!
I'm currently upgrading my Vue Skeleton from Vue 2 to Vue 3 and I could solve every third party challenge, except 1.
I'm using Vue 3 in its global variant. See here
In line 1: var Vue = ....
Now I open your project. See here
In line 385: var FontAwesomeIcon = vue.defineComponent({
I had to change every vue. to Vue. and FA works
Could you implement something like this?
var $vue = typeof Vue === 'object' ? Vue : vue;
var FontAwesomeIcon = $vue.defineComponent({

My Packages:
"@fortawesome/fontawesome-free": "^6.2.1",
"@fortawesome/fontawesome-svg-core": "^6.2.1",
"@fortawesome/free-brands-svg-icons": "^6.2.1",
"@fortawesome/free-regular-svg-icons": "^6.2.1",
"@fortawesome/free-solid-svg-icons": "^6.2.1",
"@fortawesome/vue-fontawesome": "^3.0.2",
"vue": "^3.2.45",

This is my current solution
Searching for *.h(), *.watch(), *.computed() and *.defineComponent() and replace it with Vue*.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions