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.

Icons are not been generated in Angular 8

See original GitHub issue

I would like to use this plugin in Angular 8. I’m using the @angular-builders/custom-webpack package to create a partial webpack configuration.

const FaviconsWebpackPlugin = require('favicons-webpack-plugin');

module.exports = {
  plugins: [
    new FaviconsWebpackPlugin()
  ]
};

When I try to generate a build the plugin is not creating the favicons. Do you have any idea of how I can solve this issue?

Thanks in advance

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
HansCronaucommented, Jun 17, 2020

I believe this isssue by @dvelazdiaz got unintentionally hijacked by @spencerspear 's unrelated issue.

@dvelazdiaz posted his question to StackOverflow as well, where it got a reply a month after this issue was closed. User Volodya Senchak there noted that Angular 8 had stopped using HtmlWebpackPlugin for generating the index.html file. He mentioned that this could be circumvented by setting "index": "" in angular.json, but that this was an imperfect solution.

I have now run into the same issue, which seems to affect more than just FaviconsWebpackPlugin. Without the aforementioned fix, I cannot inject anything in the index.html from our custom-webpack.config.js, including the HtmlWebpackPlugin options title and base.

There must be more Angular 8+ developers using FaviconsWebpackPlugin. I would be very interested to their thoughts on / solutions for the issue, as well as those of @jantimon and other maintainers.

0reactions
HansCronaucommented, Dec 26, 2020

@kontrollanten No. As far as I know this issue has not been resolved and was closed by mistake.
We have worked around it by letting FaviconsWebpackPlugin write its output to a secondary dummy index_dummy.html and manually copying the relevant lines to our primary index.html. Downside: this takes the html injection out of the build process. This process thus needs to be repeated manually every time the icons change. Luckily for us this is rare.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular Material icons not working - Stack Overflow
Faced the issue when icon was not rendering and instead Close text was displaying. Appended the above import in my scss file and...
Read more >
How to create an icon library in Angular - Medium
To set up the library we use the Angular CLI and run the following commands. ng new dinosaur-icons --create-application=false cd dinosaur-icons
Read more >
How To Use Custom SVG Icons in Angular Material
Let's learn how to use our own SVG icons in Angular Material ... To do this, open the styles.css file (that was generated...
Read more >
Angular Service Worker - Step-By-Step Guide
In this post, we will cover how we can configure the Angular CLI build pipeline to generate applications that in production mode are ......
Read more >
Icon | Angular Material
The function will be invoked with the name and namespace of an icon when the registry tries to resolve the URL from which...
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