Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
emoji-favicon-webpack-plugin
Advanced tools
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 = require('emoji-favicon-webpack-plugin');
const HtmlPlugin = require('html-webpack-plugin');
module.exports = {
plugins: [
new EmojiFaviconPlugin('🦑'),
new HtmlPlugin() // 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.
<head>
<!-- other tags -->
<link rel="shortcut icon" href="favicon.ico">
</head>
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.
new EmojiFaviconPlugin({
emoji: '🍣',
useSystem: true,
sizes: [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.
new EmojiFaviconPlugin(':bathtub:') // 🛁
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:
os: osx
# the following is required to use Ubuntu system emoji
# https://github.com/travis-ci/travis-ci/issues/8836#issuecomment-348227535
sudo: required
addons:
chrome: stable
To generate an emoji favicon with Gatsby, use the Gatsby plugin.
FAQs
Let webpack generate an emoji favicon for you
The npm package emoji-favicon-webpack-plugin receives a total of 6 weekly downloads. As such, emoji-favicon-webpack-plugin popularity was classified as not popular.
We found that emoji-favicon-webpack-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.