Question

This scenario was testet in Visual Studio 2012 with the Web Essentials extension.

Filesystem:

root\folder1\subfolder1\styles\main.less

root\folder2\subfolder1\subfolder2\styles\fear.less

main.less:

@import "../../../folder2/subfolder1/subfolder2/styles/fear.less";

Compile Error:

LESS: Couldn't load folder2/subfolder1/subfolder2/styles/fear.less (404)

Is it possible that LESS does not support multiple subdirectories?

Was it helpful?

Solution 2

Well now, I got it! @Jeff's answer brought me to the following:

@import "..\..\..\folder2\subfolder1\subfolder2\styles\fear.less";

It also works for variables. You have to declare the whole filename including the extension. No leading slash and only backslashes.

OTHER TIPS

This is apparently a known bug/issue. In the meantime you can replace the forward slash in the import path with a backslash. That worked for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top