3 years ago

Problem with Laravel Mix

Posted 3 years ago by joshgallagher24

Hi everyone!

I am using Laravel Mix in a project outside of Laravel - a static website. However, I am having an issue with the config.

I have fonts in a font folder, which I add through a SASS file as shown below:

    font-family: 'Graphik-bold'
    font-weight: 500
    src:  url('../fonts/GraphikSemibold.woff') format('woff')

    font-family: 'Graphik-reg'
    font-weight: 300
    src:  url('../fonts/GraphikReg.woff') format('woff')

Here, in the paths I set "../fonts/GraphikSemibold.woff", however, upon compilation this path is changed to "/fonts/GraphikSemibold.woff".

How do I stop Laravel Mix from changing the file path?

Please sign in or create an account to participate in this conversation.