standard-things / esm

Tomorrow's ECMAScript modules today!
Other
5.26k stars 146 forks source link

Support for importing data: URI #823

Closed thgh closed 5 years ago

thgh commented 5 years ago

Example code:

import('data:application/javascript;charset=utf-8;base64,ZG9jdW1lbnQud3JpdGUoImhlbGxvIGZyb20gbW9kdWxlIik')

https://jsfiddle.net/wt4kyp36/

At least Chrome, Firefox and Safari support it.

jdalton commented 5 years ago

Hi @thgh!

This is on my list as a possible extension to esm, but I haven't gotten around to it. If you feel up for creating a PR though I'd totally add it.

TomasHubelbauer commented 5 years ago

@jdalton would it be possible to keep this issue open and mark it as help-wanted then? That way GitHub will surface it in a few places. I found this by chance when looking for something else and since it seems to be a roadmap item (no matter how far off) it strikes me as odd to see it closed.