Awesome
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')