Cognizant-CDE-Australia / generator-confit

Build-tool generator for current and future web.
https://odecee.github.io/generator-confit
Other
29 stars 3 forks source link

Add support for favicons for Webpack #83

Open uglow opened 7 years ago

uglow commented 7 years ago
Nighthawk14 commented 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.

uglow commented 7 years ago

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