I'm coming to the point where I'm pushing my app to production but not currently there yet (all the following screenshots are from my local machine), however when trying to install fontawesome I'm running into issues.
I've tried everything I can find on stackoverflow and on here, but I just get square icons. It doesn't seem to be pulling the icons in.
APP.SCSS:
// Fonts
@import url('https://fonts.googleapis.com/css?family=Nunito');
@import '~@fortawesome/fontawesome-free/scss/fontawesome.scss';
@import '~@fortawesome/fontawesome-free/scss/solid.scss';
@import '~@fortawesome/fontawesome-free/scss/regular.scss';
@import '~@fortawesome/fontawesome-free/scss/brands.scss';
// Variables
@import 'variables';
// Custom
@import 'custom';
// Bootstrap
@import '~bootstrap/scss/bootstrap';
// Select 2 dropdown
@import '~select2/dist/css/select2.css';
// ChartJS
//@import '~chart.js/dist/Chart.min.css';
//Datatables
@import '~datatables.net-bs4/css/dataTables.bootstrap4.css';
I also tried copying over the fonts into a webfonts folder, hence why I have duplicates in my following structure:
Still no luck. I've also tried adding the following to my app.scss file:
$fa-font-path: "./webfonts";
Also, I spotted this in the compiled app.css
object Module?
What am I missing here? I've tried creating a new project and font-awesome works first time. I've checked the webpack.mix and its all pretty standard. No extra config used:
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');
/*mix.copy('node_modules/@fortawesome/fontawesome-free/', 'public/webfonts')*/
mix.copy(
'resources/js/custom/*.js',
'public/js/custom/');
EDIT - here's my node_modules: