Skip to content
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

output imports is empty. #3508

Closed
underfin opened this issue Jun 1, 2020 · 5 comments
Closed

output imports is empty. #3508

underfin opened this issue Jun 1, 2020 · 5 comments

Comments

@underfin
Copy link

underfin commented Jun 1, 2020

// less1.less
@import "./less2.less";
@import "./css.css";
.mixin {
  @import "./less3";
}
body {
  color: red;
}
var css = require("fs").readFileSync("./less1.less", "utf8")

require('less').render(
    css,
    {
      filename: './less1.less',

    },
    (err, output) => {
      console.log( output)
//  {  css: '@import "css.css";\nbody {\n  color: red;\n}\nbody {\n  color: red;\n}\n',imports: []}
    }
)

Bug description

I get empty imports output when complier less file.

Expect behavior

The imports should has import references.

@matthew-dean
Copy link
Member

Hmm, if this was an existing feature, I don't think it's documented nor has tests. Can you point to documentation that outlines this feature?

@underfin
Copy link
Author

underfin commented Jun 1, 2020

@matthew-dean
Copy link
Member

@underfin Got it. It must be recent then, and didn't have corresponding output tests. I'll take a look, thanks.

matthew-dean added a commit that referenced this issue Jun 1, 2020
@matthew-dean
Copy link
Member

@underfin Please test out this PR: #3509

@underfin
Copy link
Author

underfin commented Jun 2, 2020

Thanks for your quickly fix! It is fixed already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants