I would like to use some FontAwesome fonts in a Vue 2.5 project (running with Laravel). According to the manual the best way if I don't want to use CDN and make my app run offline is to add this to my app.js:
import { library } from '@fortawesome/fontawesome-svg-core'
import { faUserSecret } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
library.add(faUserSecret)
Vue.component('font-awesome-icon', FontAwesomeIcon)
Then in my Vue component (.vue) I have to use this:
<font-awesome-icon icon="user-secret" />
So each time I want to use a new icon I have to:
Check the
freebuttonSearch for an icon
Go to the detail
Copy the link i.e.
<i class="far fa-eye"></i>Go to my
app.js(or in my case myfontawesome.js) and add:import { faUserSecret, faEye } from '@fortawesome/free-solid-svg-icons' library.add(faUserSecret) library.add(faEye)Go to my Vue component and add
<font-awesome-icon icon="eye" />wherever I want to
Is this process optimum and minimal?