SoFunction
Updated on 2025-04-06

Two ways to use font-awesome in vue-cli component template

Method 1:

npm install font-awesome

Add import 'font-awesome/css/'

Method 2:

existOfficial websiteDownload the code locally, it should now be font-awesome-4.7, put the entire folder into the static folder, and then add <link to it

rel="stylesheet" href="/static/font-awesome-4.7/css/" rel="external nofollow" >, it should be fine.

How to use: <i class="fa fa-home fa-lg"> Home page</i>

The two methods of using font-awesome in the vue-cli component template are all the content I share with you. I hope you can give you a reference and I hope you support me more.