For instance, we have "sub/variables.less" which contains:
@img-width: image-width("../img/test.png");
And if try to import "~sub/variables.less" in other file (the resolve.root is set correctly) via:
@import (reference) "~sub/variables.less";
the "less-loader" will throws exception:
Module build failed: error evaluating function `image-width`: Cannot 'resolveSync' because the fileSystem is not sync. Use 'resolve'!
@ <full-path-to-file>/sub/less/variables.less