Skip to content

A craco plugin to leverage favicons-webpack-plugin, which in turn leverages favions to generate icons.

License

Notifications You must be signed in to change notification settings

rickysullivan/craco-favicons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

craco-favicons

A craco plugin to leverage favicons-webpack-plugin, which in turn leverages favicons to generate icons.

Usage

  1. Add the craco-favicons plugin into your craco.config.js.

  2. Add a logo.png file to the root directory of the project.

  3. Profit.

/* craco.config.js */

const CracoFavIconsPlugin = require("craco-favicons");

module.exports = {
    plugins: [{
        plugin: CracoFavIconsPlugin
    }]
}

Or specify your own options:

/* craco.config.js */

const CracoFavIconsPlugin = require("craco-favicons");

module.exports = {
    plugins: [{
        plugin: CracoFavIconsPlugin,
        options: {
            logo: "./src/assets/images/app-logo.svg",
            inject: true,
            prefix: "static/icons/",
            favicons: {
                icons: {
                    android: { offset: 10 },
                    appleIcon: { offset: 10 },
                    coast: false,
                    yandex: false,
                    appleStartup: { offset: 10 },
                    firefox: false,
                    windows: false
                }
            }

        }
    }]
}

All options supplied are passed to favicons-webpack-plugin.

Please see https://github.com/jantimon/favicons-webpack-plugin#advanced-usage and https://github.com/itgalaxy/favicons#usage for more configuration info.

Prerequisites

Craco

Installing

npm

npm i craco-favicon -D

Or Yarn

yarn add craco-favicon -D

Acknowledgments

About

A craco plugin to leverage favicons-webpack-plugin, which in turn leverages favions to generate icons.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •