1.0.2 • Published 5 years ago

rollup-plugin-rawsvg v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

rollup-plugin-rawsvg

Import SVG raw files

Installation

yarn install rollup-plugin-raw-svg --dev

Usage

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

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

You can use svgs in your bundle thusly:

import iconMenu from './icon/menu.svg'
document.body.appendChild( iconMenu )

SVGs are not encoded using base64, it will only import raw files as text

Sources

This plugin was built (based on the rollup-plugin-svg) but remove base64 encoding mecanism

rollup-plugin-svg

License

MIT

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago