how to include @mdi/font in laravel(7.2)

Viewed 1717

i am trying to include this(https://materialdesignicons.com/) package in my fresh laravel(7.2) project i have done this so far npm install @mdi/font and i can see the package in the enter image description here

but when i add this line in my welcome.blade.php

 Bob lives in a <span class="mdi mdi-home"></span>.

the output i get is: enter image description here

i have also build and run my npm but i still get nothing. futher more i have also tried importing it in my app.js file right on top like this import '@mdi/font/css/materialdesignicons.css'

1 Answers

My laravel is 6.x:

# npm install -D @mdi/font node-sass

Open resources/sass/app.scss

// Fonts
@import "~@mdi/font/scss/materialdesignicons.scss";

Than:

# npm run dev

If no errors display[enter image description here][1], you'll see mdi fonts in your public folder...

https://i.stack.imgur.com/f6SHC.png

Related