lasso-js / lasso-less

Lasso.js plugin to support compilation of less dependencies
7 stars 10 forks source link

Cannot resolve less variables within @import statement #19

Open sampology opened 8 years ago

sampology commented 8 years ago

Use case: Semantic-UI Variables defined in theme.less file and referenced in @import are not resolved:

Error: Async fragment failed (lasso-slot:head). Exception: Error: Error while writing bundle "login/lasso-less (head, css)" Error: Error: ENOENT: no such file or directory, open '/home/www/xxx/semantic/src/@{themesFolder}/default/globals/site.variables'

Also, I believe variables defined in theme.config(.example) and passed to theme.less are also not being resolved.

/* Path to theme packages */
@themesFolder : 'themes';

/* Path to site override folder */
@siteFolder  : 'site';

/*******************************
         Import Theme
*******************************/

@import "theme.less";
Mrtenz commented 6 years ago

Seems that it cannot handle @imports that do not specify a file extension. Importing default/globals/variables does not work, but default/globals/variables.less does.