Skip to content

Variables in import statements. #2772

Closed
@Giwayume

Description

@Giwayume

I get "SyntaxError: variable @url is undefined" with the following logic:

.dynamic-import(@url) {
    @import "@{url}";
}
.dynamic-import("test/definition.less");

It appears imports are not as dynamic as I'd hoped. Is this expected behavior?

Funny thing is if I don't even call the mixin (only declare it), there's no errors.

.dynamic-import(@url) {
    @import "@{url}";
}

Note: tested on 2.7.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions