Emoji Favicon Webpack Plugin
Generates a favicon based on an emoji for your webapp
$ npm install --save-dev emoji-favicon-webpack-plugin
Add the plugin to your webpack config and pass your emoji of choice to it as an argument. A favicon will be generated and outputted with your bundle.
const EmojiFaviconPlugin = ;const HtmlPlugin = ;moduleexports =plugins:'🦑'// not required, but really handy;
If you're using html-webpack-plugin, the HTML tags necessary to include your favicon will automatically be appended to the
<head> of your document.
<!-- other tags -->
By default, we use Twemoji for consistent results across all operating systems. If you would prefer to use your system's emoji font instead, specify the
useSystem option in the constructor.
emoji: '🍣'useSystem: truesizes: 16 // default is [16, 32, 48]
You can also specify a shortcode instead of an emoji! Check out this link for a complete listing of emojis and their shortcodes.
':bathtub:' // 🛁
A note about using system emoji
MacOS has a pretty awesome and extensive library of emoji built into its Apple Color Emoji typeface, but other operating systems aren't so lucky. If you normally develop on a Mac, you will see different results when you build your app on a Linux or Windows machine.
In order to get consistent results between development and production, you should make sure that you use the same operating system for building in each environment. The configuration required to make this happen varies between CI tools, but if you use TravisCI, you can add the following to your
.travis.yml file depending on what OS you're trying to target:
# the following is required to use Ubuntu system emoji#sudo: requiredaddons:chrome: stable