eliyas5044's avatar

[5.4] mix.sass() couldn't mention fonts path properly.

When i run npm run dev , it compiles sass file into css, also copied fonts folder into public folder. But fonts path is wrong.

@font-face {
  font-family: 'Glyphicons Halflings';
  src: url(/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot?f4769f9bdb7466be65088239c12046d1);
  src: url(/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot?f4769f9bdb7466be65088239c12046d1) format("embedded-opentype"), url(/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2?448c34a56d699c29117adc64c43affeb) format("woff2"), url(/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff?fa2772327f55d8198301fdb8bcfc8158) format("woff"), url(/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf?e18bbf611f2a2e43afc071aa2f4e1512) format("truetype"), url(/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.svg?89889688147bd7575d6327160d64e760) format("svg");
}

It should

src: url(../fonts/)

My sass file code

// Bootstrap
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";

My webpack code

mix.js('resources/assets/js/app.js', 'public/js')
   .sass('resources/assets/sass/style.scss', 'public/css/style.css');

What should i change to make right fonts path ?

0 likes
0 replies

Please or to participate in this conversation.