You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
./subdir/mixins.less:
/* These are mixins from subdir */
If app.less is compiled from the root directory, lib.less includes the mixins from the root dir instead of the subdir:
lessc app.less
/* These are mixins from the root dir */
I discovered this while working with Bootstrap and also importing my own custom mixin file; when I tried to compile from my root less directory, Bootstrap was importing my mixins instead of boostrap/mixins since I gave mine the same name. Simply renaming my mixin file to something unique allows to me compile without problems, but this still seems like a problem with how lessc handles relative path imports.
It should be noted that these paths are handled correctly when rendering client-side with less.js, which is how I started developing. I only ran into this problem while trying to work out a build process using recess.
The text was updated successfully, but these errors were encountered:
Hrmm, you are right.. it searches the current directory first. If I change the current directory and run lessc again, I get a different behaviour. definitely a bug.
Given the following directory structure:
./app.less:
@import "subdir/lib.less";
./mixins.less:
/* These are mixins from the root dir */
./subdir/lib.less:
@import "mixins.less";
./subdir/mixins.less:
/* These are mixins from subdir */
If app.less is compiled from the root directory, lib.less includes the mixins from the root dir instead of the subdir:
lessc app.less
/* These are mixins from the root dir */
I discovered this while working with Bootstrap and also importing my own custom mixin file; when I tried to compile from my root less directory, Bootstrap was importing my mixins instead of boostrap/mixins since I gave mine the same name. Simply renaming my mixin file to something unique allows to me compile without problems, but this still seems like a problem with how lessc handles relative path imports.
It should be noted that these paths are handled correctly when rendering client-side with less.js, which is how I started developing. I only ran into this problem while trying to work out a build process using recess.
The text was updated successfully, but these errors were encountered: