我正在使用gulp-sass
来编译node.js
中的sass。我使用libsass
配置来设置includePaths
选项。
以下代码有效:
includePaths: './project/components/controls/selectAgencies/'
...但我想用递归做一些事情并得到相同的结果,类似下列其中一种可能性。就目前而言,使用这些设置我会收到错误:"要导入的文件未找到或不可读"。
includePaths: './project/components/controls/'
// or
includePaths: './project/components/controls/**/'
在罗盘中,这就像设置add_import_path "project/components"
答案 0 :(得分:1)
The problem was actually in my sass file. If my include path is
./project/components/controls/
and the sass file lives at
./project/components/controls/selectAgencies/_selectAgencies.scss
then my .scss file should reflect the rest of the path, like so:
@import 'selectAgencies/selectAgencies'