1.0.1 • Published 6 years ago

rsvg-webpack-plugin v1.0.1

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

RSVG WebPack plugin

A plugin for WebPack to rasterize svg files using librsvg.

Installation

npm install --save-dev rsvg-webpack-plugin

Usage

const RsvgWebpackPlugin = require('rsvg-webpack-plugin')

module.exports = {
  // ...
  plugins: [
    new RsvgWebpackPlugin([
      { file: 'assets/logo.svg', name: 'logo-16.png', width: 16, height: 16 },
      { file: 'assets/logo.svg', name: 'logo-32.png', width: 32, height: 32 },
      { file: 'assets/logo.svg', name: 'logo-48.png', width: 48, height: 48 }
    ])
  ]
}

This will output three files: logo-16.png, logo-32.png and logo-48.png.