-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Inconsistent results of multiple imports with (reference)
.
#3374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
At quick glance I suspect it's about the " |
I locally remove extra "/" - result the same. I think it's different issue. Working: @import "./components/hello-world/hello-world.less";
@import "./components/hello-galaxy/hello-galaxy.less"; With issue: @import "./@{path-to-components}/hello-world/hello-world.less";
@import "./@{path-to-components}/hello-galaxy/hello-galaxy.less"; Result: Correct entry - exports hello-galaxy, but issued (with variables in the path) - don't. |
I tested this in both Less Here's a few minimalistic examples to illustrate the inconsistency: whatever {whatever: whatever} indirect.less: @import "whatever.less"; indirect-ref.less: @import (reference) "whatever.less"; main-1: @import (reference) "whatever.less";
@import "whatever.less"; // not imported
/* something */ main-2: @import "indirect-ref.less";
@import "whatever.less"; // imported
/* something */ main-3: @w: w;
@import "indirect-ref.less";
@import "@{w}hatever.less"; // not imported
/* something */ main-4: @import "indirect-ref.less";
@import "indirect.less"; // not imported
/* something */ Labeling as a bug since regardless of what result we expect, what is important is that we expect the same output from all these I guess this is related to #2729 (i.e. most likely a @mantsevich Still notice that technically it's |
(reference)
.
Variables in @import statement cause for unexpected result.
I prepared demo app.
https://github.com/mantsevich/less-variables-import-issue-demo
What do we have:
Difference in the source code: entry-issue.less uses variable in @import statement.
Difference in the result: issue.css doesn't include hello-galaxy component at all.
Expected result: Result of CSS files should be identical.
I think problem related @import with variable in the path + @import (reference) in the child less files. If remove (reference) flag from hello-world.less file, then result will be "the same".
The text was updated successfully, but these errors were encountered: