asual/lesscss-engine — Issue #21: @import in relation to JSF
Author: dabloem
Created: 2011-12-16 19:58:35+00:00
State: open

Hi, this is not really an issue/bug. But rather a question how to proceed.

I created a [resourceHandler] [1] for JSF 2 to process/serve less files.
The LessResource is accountable for serving up the [compiled] [2] less resource.
When using the @import directive, the engine is unable to find the file. This sounds logical, how could the LessEngine know where to find the imported resource?
The error is the following:
com.asual.lesscss.LessException: org.mozilla.javascript.EcmaError: TypeError: Cannot call method "replace" of undefined (/../META-INF/less.js#2517)
at com.asual.lesscss.LessEngine.parseLessException(LessEngine.java:188)

Question, what is the best approach to include an imported file.

Regards,
Duncan

[1]:http://docs.oracle.com/javaee/6/api/javax/faces/application/ResourceHandler.html "ResourceHandler"
[2]:https://github.com/dabloem/jsf-less-resourcehandler/blob/master/src/main/java/nl/dabloem/jsf/less/LessResource.java#L56