Open uglow opened 7 years ago
👍
If you are using HtmlWebpackPlugin
you can add the path to your favicon in the config:
new HtmlWebpackPlugin({
filename: 'index.html',
favicon: '/img/favicon.png'
});
Also, this plugin https://github.com/jantimon/favicons-webpack-plugin will generate the favicons.
If you use both plugins HtmlWebpackPlugin
and FaviconsWebpackPlugin
the favicons will be automatically inserted in the html without having to specify them in the HtmlWebpackPlugin
config.
In Angular 2 Class repo, they have a HTMLElementsPlugin which does exactly what we want: https://github.com/AngularClass/angular2-webpack-starter/blob/master/config/html-elements-plugin/index.js