guybedford / require-css

A RequireJS CSS loader plugin to allow CSS requires and optimization
MIT License
983 stars 364 forks source link

image urls relative to page not js #193

Open oppianmatt opened 9 years ago

oppianmatt commented 9 years ago

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.

geromueller commented 8 years ago

Hi,

i have the same issues. Are there any solutions?