Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zadzbw/favicon-hash-webpack-plugin
an extension to add favicon hash for the html-webpack-plugin
https://github.com/zadzbw/favicon-hash-webpack-plugin
favicon html-webpack-plugin webpack webpack-plugin
Last synced: about 2 months ago
JSON representation
an extension to add favicon hash for the html-webpack-plugin
- Host: GitHub
- URL: https://github.com/zadzbw/favicon-hash-webpack-plugin
- Owner: zadzbw
- License: mit
- Created: 2018-02-07T08:58:50.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-27T20:44:18.000Z (over 1 year ago)
- Last Synced: 2024-08-10T10:26:19.945Z (5 months ago)
- Topics: favicon, html-webpack-plugin, webpack, webpack-plugin
- Language: JavaScript
- Homepage:
- Size: 271 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# favicon-hash-webpack-plugin
[![NPM version][npm-image]][npm-url]
[![Node version][node-version-image]][npm-url]
[![Build Status][travis-image]][travis-url]This is an extension plugin for [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin) - it can add hash to favicon file, just like `favicon.[hash].ico`, the hash algorithm is md5 now, and use [blueimp-md5](https://github.com/blueimp/JavaScript-MD5) to calculate hash.
## Installation
### Notice
> * it requires node **v8** or higher
> * it requires [webpack](https://webpack.js.org/) **>=v4.0.0** and [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin) **>=3.0.0**
> * if you want to use this plugin in webpack v3, please check [v1 branch](https://github.com/zadzbw/favicon-hash-webpack-plugin/tree/v1)### Install
You can install this plugin with npm:
```bash
npm install favicon-hash-webpack-plugin --save-dev
```or you can use yarn:
```bash
yarn add favicon-hash-webpack-plugin -D
```## Usage
First, require the plugin in your webpack config:
```js
const FaviconHashPlugin = require('favicon-hash-webpack-plugin');
```finally, set favicon in `html-webpack-plugin` and add the plugin in `plugins` options after `html-webpack-plugin`
```js
...
plugins: [
new HtmlWebpackPlugin({
favicon: 'path-to-favicon/favicon.ico', // favicon path
}),
new FaviconHashPlugin({}),
],
...
```and the following icon link will be injected into ``:
```html
```
## Options
This plugin only has the default options now.
## License
[MIT License](http://www.opensource.org/licenses/mit-license.php)
[npm-image]: https://badgen.net/npm/v/favicon-hash-webpack-plugin
[node-version-image]: https://badgen.net/npm/node/favicon-hash-webpack-plugin
[npm-url]: https://www.npmjs.com/package/favicon-hash-webpack-plugin
[travis-image]: https://travis-ci.org/zadzbw/favicon-hash-webpack-plugin.svg?branch=master
[travis-url]: https://travis-ci.org/zadzbw/favicon-hash-webpack-plugin