data-uri.macro
v1.0.0
Published
🎣 Convert files to data-uris at build time.
Downloads
192
Readme
data-uri.macro
Convert your assets to data URIs at build time with babel macros.
Installation
npm install --save-dev data-uri.macro
Usage
import dataUri from 'data-uri.macro'
import sampleSvg from '../assets/sample.svg'
const svg = dataUri(sampleSvg)
const png = dataUri(../assets/other.png)