I've tried it out on a css file containing links to images, but it seems the images try to get loaded relative to the current page and not the js file it loads from.
For example
style.css contains link to image.png. You embed and put in file.js with the r.js optimizer. Now you access www.example.com/foo/bar which loads up the file.js from media.example.com/file.js
The request for image.png is going to www.example.com/foo/image.png and not media.example.com/image.png which is where file.js (and all the other statics) are hosted.
I've tried it out on a css file containing links to images, but it seems the images try to get loaded relative to the current page and not the js file it loads from.
For example
style.css contains link to image.png. You embed and put in file.js with the r.js optimizer. Now you access www.example.com/foo/bar which loads up the file.js from media.example.com/file.js
The request for image.png is going to www.example.com/foo/image.png and not media.example.com/image.png which is where file.js (and all the other statics) are hosted.