0.1.3 • Published 7 years ago

rollup-plugin-quillsvg v0.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

rollup-plugin-svg

Import SVG files for quill

Installation

yarn add rollup-plugin-quillsvg --dev

Usage

// rollup.config.js
import svg from 'rollup-plugin-svg';

export default {
  entry: 'src/input.js',
  dest: 'dist/output.js',
  plugins: [
    quillsvg()
  ]
};

You can use svgs in your bundle thusly:

import logo from './desirable-objects.svg'
document.body.appendChild( logo )

SVGs are encoded using base64, which means they will be 33% larger than the size on disk. You should therefore only use this for small images where the convenience of having them available on startup (e.g. rendering immediately to a canvas without co-ordinating asynchronous loading of several images) outweighs the cost.

Sources

This plugin was built (based on the rollup-plugin-image plugin) because it appears that the two existing suitable plugins:

rollup-plugin-image rollup-plugin-url

don't seem to work any more. I wanted a simple solution to provide SVG images to Vudash

License

MIT

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.0.25

7 years ago

0.0.24

7 years ago

0.0.23

7 years ago

0.0.222

7 years ago

0.0.21

7 years ago

0.0.20

7 years ago

0.0.19

7 years ago

0.0.18

7 years ago

0.0.17

7 years ago

0.0.16

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago