I have a build that compiles several less files (all are actually imported into one master.less file). One of the options for the build is strictImports which suggests that it forces the evaluation of imports. Does anyone know if this have to do with operations in imported files, or am I completely missing the point?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The strictImports
controls whether the compiler will allow an @import
inside of either @media
blocks or (a later addition) other selector blocks. See some of the comments from this closed issue with regards to that.
So with it set to true
these are not allowed:
@media screen {
@import somefile.less;
}
.mySelector {
@import somefile.less;
}