Respect less includePaths if specified in .compilerc#74
Respect less includePaths if specified in .compilerc#74achingbrain wants to merge 1 commit intoelectron-userland:masterfrom
Conversation
|
I like the general idea of this patch, but I'm not sure about the actual logic - why the |
|
Sorry that it's not clear. Let's say my project has a file layout something like this: In @import (css, inline) 'foo.css';
@import (css, inline) 'bar.css';In my {
"env": {
"development": {
// ...
"text/less": {
"paths": [
"./node_modules",
"./shared"
]
// ...Taking It then uses the At the moment if the file does not exist it will silently ignore it, perhaps it should throw an error? |
|
@paulcbetts any further comments on this or can it be merged? |
I have a .less file,
/me/project/foo.lessthat looks like this:ace-cssis present in thenode_modulesfolder, so I configure.compilercas so:The file is compiled and placed into the cache. Problem is the
dependentFilesfield of the cache entry for/me/project/foo.lesslooks like this:So the next time
/me/project/foo.lessis requested, everything explodes because/me/project/ace-css/css/ace.cssdoes not exist.The change in this PR is to look through the paths specified in the
.compilercfile when working out the paths to dependent files before placing them into the cache.