Created
August 20, 2019 03:02
-
-
Save longlho/b8730da2796aad52554fc29fb78a19c5 to your computer and use it in GitHub Desktop.
transformer-p10.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as png from 'foo.png' | |
function render () { | |
return <img src={png} /> | |
} | |
// Transform to | |
const hoisted_img = <img src="data:base64..." /> | |
function render () { | |
return hoisted_img | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment