Rollup plugin to generating favicons and their associated files.
It uses the favicons generator under the hood.
This plugin was inspired by the favicons-webpack-plugin.
The plugin can be used alongside the rollup-plugin-html2.
In this case rollup-plugin-favicons
should be placed before rollup-plugin-html2
in the plugin list.
npm i -D rollup-plugin-favicons
// rollup.config.js
import favicons from 'rollup-plugin-favicons'
import html2 from 'rollup-plugin-html2'
export default {
input: 'index.js',
output: {
dir: 'dist',
format: 'es',
},
plugins: [
favicons({
source: 'icon.svg',
configuration: {
appName: process.env.npm_package_displayName,
},
}),
html2({
template: 'index.html',
}),
],
}
A path to a source image which would be used to generate icons.
A configuration for the favicons. For details please read the link.