I can import fontawesome-icons in app.js:
import {createApp} from 'vue';
import app from "../vue/app";
import {library} from '@fortawesome/fontawesome-svg-core';
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome';
import {faWrench} from '@fortawesome/free-solid-svg-icons';
library.add(faWrench);
createApp(app)
.component('fa', FontAwesomeIcon)
.mount("#app");
and use them in components like so:
<fa :icon="[ 'fa', 'wrench' ]" size="2x"></fa>
The font-awesome-animation npm doc tells to use this:
<i class="fa fa-wrench faa-wrench animated"></i>
but it doesn't seem to work in Vue 3.
I've tried importing font-awesome-animation after installing it like so:
import {faaWrench} from 'font-awesome-animation';
library.add(faaWrench);
but it breaks the site and the console shows:
Uncaught TypeError: Cannot read properties of undefined (reading 'prefix')
How do I use font-awesome-animation in Vue 3?