Hi, I'm trying to add a favicon to my styleguide document via HtmlWebpackPlugin. However, in Configuring webpack it mentioned that HtmlWebpackPlugin would be ignored cause styleguidist also has this plugin. So how can I add favicon to the generated html page? Is there another way to achieve it?
Just put a favicon.ico file if you deploy your style guide into the server root folder.
Add a custom HTML template using the template option.
@sapegin Thanks for reply. I ended up with adding a template file and specified a favicon link in template. I think it would be best if there is a favicon config option in styleguidist configuration since HtmlWebpackPlugin also has this config option.
@hueyhe can you explain me what was your workaround?
I just had this issue too, for anyone struggling...
/src/assets/ directory, and put your favicon.ico file inside.styleguide.config.js file (should be at root), add the assetsDir config:module.exports = {
assetsDir: 'src/assets/',
template: 'src/templates/index.html' // add this file if you want to use other favicon links
}
Most helpful comment
I just had this issue too, for anyone struggling...
/src/assets/directory, and put your favicon.ico file inside.styleguide.config.jsfile (should be at root), add the assetsDir config: