Skip to content
🎣 Convert files to data-uris at build time.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.babelrc.js
.gitignore
.npmrc
.travis.yml
README.md
lint-staged.config.js
package.json

README.md

data-uri.macro

Babel Macro npm version Build Status npm

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')
You can’t perform that action at this time.