Loading base64 data

Anything can be converted to base64, afaik. But what I need is keeping all assets (models and textures) as normal separate files, and embedding them into one js file at compile-time to avoid cross-origin problems when running index.html. (Which I suppose can be done only by converting the assets data into base64 format.)