1//install fontawesome icons
2npm install --save-dev @fortawesome/fontawesome-free
3
4//inside main.js add
5import '@fortawesome/fontawesome-free/css/all.css' <------
6import '@fortawesome/fontawesome-free/js/all.js' <------
7.
8.
9.
10new Vue({ router, store, render: h => h(App),}).$mount('#app')
11
12
13// you can now use the icons anywhere in your project with the <i>
14 <i class="fab fa-2x fa-facebook"></i>
15 <i class="fab fa-2x fa-twitter"></i>
16 <i class="fab fa-2x fa-instagram"></i>
1// import required libraries
2npm install --save @fortawesome/fontawesome-svg-core
3npm install --save @fortawesome/free-solid-svg-icons
4npm i --save @fortawesome/vue-fontawesome@prerelease
5
6//in main.js include the following
7import { library } from '@fortawesome/fontawesome-svg-core';
8import { fas } from '@fortawesome/free-solid-svg-icons';
9library.add(fas);
10
11//include the fontawesome icons in the createApp function
12createApp(App).use(store).use(router).mount('#app').component('fa', FontAwesomeIcon);
13