question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Laravel 5.4 - Bootstrap glyphicons don't work after sass integration

See original GitHub issue

Use Laravel 5.4 Fresh Installation. Did npm run dev. Bootstrap, Jquery worked perfect, but Glyphicons weren’t displayed. Checking my public/css/app.css I saw, that Glyphicons font-face path are not suitable.

src: url(/fonts/glyphicons-halflings-regular.eot?f4769f9bdb7466be65088239c12046d1);

If I, manually use ../fonts instead of /fonts it will work. I tried to figure out and edit the default path in _variables.css. I set:

$icon-font-path = "../fonts" - but npm gives error

By default it is: "~bootstrap-sass/assets/fonts/bootstrap/"

Copied fonts folder inside puclic/css folder, didn’t work.

Added options to the webpack.mix.js file: options({processCssUrls: false})

and in _variables.css again set: $icon-font-path = "../fonts"

Run npm-run-dev and it worked, glyphicons were displayed. But, I don’t want to set false for processCssUrls. Because, in this case I will not able to minimize css files using command: npm run production.

I updated laraval-mix version to 0.10.0, wasn’t positive result.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
jeanfredsoncommented, Jun 4, 2017

You can solve this problmem with CDN of BOOTSTRAP

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
	<!-- Optional theme -->
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

	<!-- Latest compiled and minified JavaScript -->
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
6reactions
ruchernchongcommented, Jun 5, 2017

@jeanfredson CDN defeats the whole purpose of using Laravel-Mix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Laravel 5.4 - Bootstrap glyphicons don't work after sass ...
Copied fonts folder inside puclic/css folder, didn't work. Run npm-run-dev and it worked, glyphicons were displayed.
Read more >
Laravel 5.4 - Bootstrap glyphicons don't work ... - Stack Overflow
Well, I just installed fresh Laravel 5.4. Then installed npm and decided first time to use webpack instead of gulp.js. As you know,...
Read more >
Accordion · Bootstrap v5.2
Build vertically collapsing accordions in combination with our Collapse JavaScript plugin. On this page
Read more >
Limitless - Responsive Web Application Kit - ThemeForest
Meet Limitless – responsive web application kit. Limitless – a new professional admin template, based on Bootstrap framework.
Read more >
Create a Laravel and VueJS Powered Real Time Chat Room
Read this detailed tutorial on how you could easily create a realtime chatroom application using Laravel 5.4, VueJS and Pusher.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found