Open kevinkurpe opened 10 years ago
Which version do you use? SVG support was added a long time ago in v0.0.11 but that might be your problem.
I'm using version 0.3.2
I have an exemple here with an SVG inside a CSS that works :
http://code.hooktstudios.com/css/application.4b394912e9f486980c222a6dd5071d25.css
You can browse source here : https://github.com/hooktstudios/code
Assets URL in CSS are being replace with cache-busting prefixes in this method, it may give you a hint why it does not work in your case :
https://github.com/rstacruz/sinatra-assetpack/blob/master/lib/sinatra/assetpack/css.rb#L6
Looking quickly at the regexp the ' or " should not be required, but maybe there is a bug, you should try writing url('/images/map.svg');
rather than url(/images/map.svg);
I have successfully implemented sinatra-assetpack in my application with one exception: svg images in my css stylesheets.
Neither cache-control headers nor a cache-busting suffixes are being applied to svg images in my css stylesheets.
e.g.
I should mention that svgs located in my erb templates load properly.
Any ideas?