Skip to content

Inconsistent results of multiple imports with (reference). #3374

Open
@dmantsevich

Description

@dmantsevich

Variables in @import statement cause for unexpected result.

I prepared demo app.
https://github.com/mantsevich/less-variables-import-issue-demo

  1. download
  2. npm i
  3. npm start
  4. compare "correct.css" & "issue.css" files.

What do we have:

  • Two similar files: entry-correct.less & entry-issue.less import 2 components: hello-galaxy & hello-world
  • hello-world imports hello-galaxy component with (reference) flag

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions