Search code examples
cssvue.jssasspathfont-face

Vue Js - Typography


I have this folder structure in my vue.js app

enter image description here

In my typography.scss I have this declaration

@font-face {
    font-family: "Gilroy-Black";
    src: url(fonts/Gilroy-Black.otf);
}

And in my login.vue file I have this import

@import "../../../sass/typography.scss";

But I get this error

Module not found: Error: Can't resolve './fonts/Gilroy-Black.otf' in 'C:\xampp\htdocs\projectname\resources\js\pages\auth'

I would really appreciate a solution for this one, Thank you a lot! :)


Solution

  • Maybe the answers to this GitHub issue could help you :
    https://github.com/angular/angular-cli/issues/5213

    Angular users seems to experience a similar problem to yours.