rsvg-webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i rsvg-webpack-plugin

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

2.6 kB

Total Files

4

Last publish

Collaborators

  • linusu