rollup-plugin-svg-slim

1.0.0 • Public • Published

rollup-plugin-svg-slim

rollup plug-in, read the svg file and use svg-slim to compress

Installation

npm install rollup-plugin-svg-slim -D

or

yarn add rollup-plugin-svg-slim -D

Configuration

The following is the schematic code in rollup.config.js

Use default configuration

import svgs from 'rollup-plugin-svg-slim';
export default ({
    ...
	plugins: [svgs()],
    ...
});

Custom configuration

For custom configuration, please refer to the documentation of svg-slim

import svgs from 'rollup-plugin-svg-slim';
export default ({
    ...
	plugins: [
        svgs({
            rules: {
                'shorten-decimal-digits': false,
                'shorten-id': false,
            },
            params: {
                sizeDigit: 2,
                angelDigit: 2,
            },
        }),
    ],
    ...
});

Readme

Keywords

none

Package Sidebar

Install

npm i rollup-plugin-svg-slim

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

4.13 kB

Total Files

8

Last publish

Collaborators

  • benboba_cn