-
Notifications
You must be signed in to change notification settings - Fork 12k
Webpack: not loading font-awesome fonts #7611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
working for me, tried this today in one of our business apps. (@angular4.3.6) in my case it loads the font stuff from the same folder i specified for font-awesome.min.css angular-cli.json
|
In my case all the fonts are loaded into dist folder, but the css points to the wrong directory. So if you have a look in the above screenshot, on the left in the source for the application, the root folder location is '/assets/accounts/dist' but if you look at the 404 error messages on the right, the CSS tries to looks for the fonts in the wrong place - not in the '/assets/accounts/dist'. |
I was facing the same issue, turns out a slash was missing for the base-ref parameter, at its end. Fixed it running the build command like this: ng build --base-href /myapp/ --deploy-url /myapp/ |
@elvinmeza - yes, that fixes my problem. How we resolved the issue. I have the Angular 2 app running with Scala Play framework. Hence in my 'accounts.scala.html' I have Play framework serves all the static assets from '/assets/accounts/dist/' folder. When you run But when you open Play app in the browser, there is no directory like 'localhost/dist', so I was getting 404 for all fonts. After I run |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
@angular/cli: 1.2.5
node: 7.10.0
os: win32 x64
Related to #1463
I tried method mentioned by @omobono and @shri3k:
and variations of it but it still doesn't work. After I build the project, I get 404 for the fonts. No matter what I put as $fa-font-path, they are being served from the root of the project.
The text was updated successfully, but these errors were encountered: