svg-slim
TypeScript icon, indicating that this package has built-in type declarations

2.0.5 • Public • Published

svg-slim

npm version

中文版

Change Log

View change log

Introduction

svg-slim is an SVG compression tool that provides rich customization and follows the W3C SVG specification

Installation

npm install svg-slim

or

yarn add svg-slim

Use

import svgSlim from 'svg-slim';
svgSlim(svgcode[, config]).then(result => {
	console.log(result);
});

Where svgcode is svg text in string format and config is user-defined optimized configuration

Optimized Configuration

View the main item optimized configuration

Use online

svg-slim-web

Use svg-slim-loader

svg-slim-loader is a loader plugin for webpack, which supports optimization of imported SVG files

Use postcss-svg-slim

postcss-svg-slim is a plugin for postcss that supports optimizing inline SVG in CSS

Use rollup-plugin-svg-slim

rollup-plugin-svg-slim is a rollup plugin that supports SVG optimization in rollup

Why choose svg-slim?

  • Rich and powerful functions, enough personalized configuration parameters
  • Pursue the ultimate optimization effect
  • Try not to destroy the original svg effect
  • Follow the latest svg specifications

Sponsor the developer

If you think this project is helpful to you, sponsors are welcome.

Package Sidebar

Install

npm i svg-slim

Weekly Downloads

62

Version

2.0.5

License

MIT

Unpacked Size

885 kB

Total Files

244

Last publish

Collaborators

  • benboba_cn