1.0.0 • Published 3 years ago

rollup-plugin-svg-slim v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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,
            },
        }),
    ],
    ...
});
1.0.0

3 years ago