less.js icon indicating copy to clipboard operation
less.js copied to clipboard

Node.js less render - configure @import paths

Open mikhalev-im opened this issue 9 years ago • 2 comments

Hello, I am trying to handle less render in my node.js envirement, but I cannot specify default paths to look on @import directive.

In command line I can do this by --include-path option. Does node version has something like this?

I use less.render(..) method, tried to pass as options {paths: ['mypath'] }, but it doesn't work out

mikhalev-im avatar Feb 10 '17 09:02 mikhalev-im

Make sure to set the filename option (w/o it Less just can't know relative import paths - see #2342). If it "does not work" with absolute paths, provide more details.

seven-phases-max avatar Feb 10 '17 09:02 seven-phases-max

Thank you, my mistake, it was an error in my code.

mikhalev-im avatar Feb 10 '17 10:02 mikhalev-im