Closed pranavjha closed 9 years ago
The problem is that all the URL paths need to resolve to an actual file system path so that the referenced assets can go through the asset pipeline (writing/uploading, compression, fingerprinting, etc.). For example, @{icon-font-path}@{icon-font-name}.ttf
would need to some how be resolved to the full file system path for the referenced ttf
file. Since the Lasso plugin won't know the value of @{icon-font-path}@{icon-font-name}.ttf
until after rendering the Less to CSS, the plugin would need to parse the rendered CSS (which is fine, it will just make things a bit slower). Even after the plugin parses the rendered CSS to resolve the resource URLs, how does the plugin resolve that path to an actual file system path? I see the following options:
url()
as the pathDo you have any thoughts given the constraints mentioned?
@patrick-steele-idem the issue can be reproduced in the barebone setup at https://github.com/pranavjha/lasso-bootstrap.
run npm start
and hit localhost:8080
. The console should trace the error.
Thanks, @pranavjha. I'll take a look and see if we can put in a clean workaround.
I am trying to extend bootstrap to fit my requirements. I want to compile less files using lasso-less.
As suggested in the README, it is not allowed to use less variables inside URLs. Bootstrap uses it extensively, and sometimes, it can really reduce repetition as in the below example:
However, because of the URL restriction,
lasso-less
will give me the below error: