carincon93's avatar

Import fontawesome css from node_modules

I installed fontawesome with the npm command, and I want to use the css files from node_modules

Do I import it into the app.js or the app.scss?

app.js it works.

// app.js
require('./bootstrap');
require('chart.js');

import business from 'moment-business';
import 'datatables.net-bs4/css/dataTables.bootstrap4.css';
import '@fortawesome/fontawesome-free/css/all.css';

But in the app.scss, it does not work

// Variables
@import "variables";

// Bootstrap
@import '~bootstrap/scss/bootstrap';

@import '@fortawesome/fontawesome-free/css/all.css';

What is the right way?

0 likes
1 reply

Please or to participate in this conversation.