-
Notifications
You must be signed in to change notification settings - Fork 57
Error with data:uri #19
Comments
+1 |
I already wrote a couple of times before:
|
I tried to convert my css file with inline data with the yui jar from the command line and got a stackoverflow exception. Increasing the stack size of the java vm solved this problem for me. Unfortunately ruby-yui-compressor currently has no configuration to manipulate the java runtime so I had to monkeypatch it. class YUI::Compressor
def command
@command.insert 1, "-Xss8m"
@command.map { |word| Shellwords.escape(word) }.join(" ")
end
end |
+1, Increasing the java vm stack size works |
See also #9, which allows passing in VM flags in via the options hash. |
It has helped me to use the YUI Compressor from https://github.com/schleyfox/yuicompressor |
I also ran into this issue with SASS stylesheets - hopefully #9 will be merged soon so that this issue can be resolved! |
+1 ran into this today |
Yep. Just found this. Bad times. Exception in thread "main" java.lang.reflect.InvocationTargetException |
Guys. It should work now with YUI Compressor 2.4.7 http://yuilibrary.com/forum/viewtopic.php?f=94&t=7237&p=31853 With 2.4.6 I got a StackOverflowException with data URIs too. Do you know what Maven repository I can download 2.4.7 from? |
I haven't had a chance to write a test case yet for this issue, but you may want to try upgrading to v0.11.0 of this gem which includes yuicompressor 2.4.7 |
I added a test case to make sure no exceptions are raised when processing a data URI in CSS. fc91491 The test case is passing, but I actually can't make it fail even going back to the earliest versions of the yuicompressor jar that were used in this project. Please reach out if you have a failing test case you can contribute. |
We encode some images with data:uri and put it directly in CSS file (by SASS
inline-image
function).But
yui-compressor
throw error on this CSS-files:/compressor.rb:87:in
compress': compression failed (YUI::Compressor::RuntimeError)`If I put
puts stderr.read
incompress
method, I see YUI error:So, as I understand, YUI 2.4.4 have problem with data:uri images in CSS.
The text was updated successfully, but these errors were encountered: