Categories
JavaScript Answers

How to use font-awesome icons from node_modules with JavaScript?

Spread the love

To use font-awesome icons from node_modules with JavaScript, we install the font-awesome package.

To install it, we run

npm install font-awesome --save-dev

Then we import the installed module with

@import url('../node_modules/font-awesome/css/font-awesome.min.css');

with CSS.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *