Skip to content

Steakeye/rollup-plugin-favicons

 
 

Repository files navigation

rollup-plugin-favicons

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.

Install

npm i -D rollup-plugin-favicons

Usage

// 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',
    }),
  ],
}

Options

source: string

A path to a source image which would be used to generate icons.

configuration: object

A configuration for the favicons. For details please read the link.

License

MIT © Petr Tsymbarovich

About

Rollup plugin to generating favicons and their associated files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 92.8%
  • JavaScript 6.2%
  • HTML 1.0%