webpack-pwa-icons-plugin

0.0.5 • Public • Published

Install

    npm install --save-dev webpack-pwa-icons-plugin

Usage

webpack.config.js

const WebpackPWAIconsPlugin = require('webpack-pwa-icons-plugin')
 
const options = {
  iconUrl: 'public/img/icons/logo.svg', // Define the url to the icon, which you want to use for generation
  backgroundColor: "#376eab", // Define backgroundColor you want to use for Platforms, which doesn't support transparency
  outputDir: 'dist/img/icons/', // Define Output directory
}
 
const config = {
  plugins: [
    new WebpackPWAIconsPlugin(options)
  ]
}
 

Additional Options

extend

You can extend the default Presets with own icon definitions, to generate them:

  extend: [
    {size: 150, filename: 'custom-icon.png', background: false},
    {size: 180, filename: 'custom-icon-ios.png', background: true}
  ]

custom

You can replace the default Presets with own icon definitions, to generate them:

  [
    {size: 150, filename: 'custom-icon.png', background: false},
    {size: 180, filename: 'custom-icon-ios.png', background: true}
  ]

You can't use extend and custom at the same time.

Readme

Keywords

Package Sidebar

Install

npm i webpack-pwa-icons-plugin

Weekly Downloads

3

Version

0.0.5

License

MIT

Unpacked Size

4.64 kB

Total Files

5

Last publish

Collaborators

  • mutefire