[英]Imports from external styles sheet does not work angular
I have external SASS file like external.scss and which has below content 我有外部SASS文件,例如external.scss,其内容如下
@import "core/colors";
This is included into application like adding below in angular.json file 这包括在应用程序中,例如在angular.json文件中添加以下内容
"styles": [
"path/external.scss",
"styles.scss"
],
I try to access some variables present in colors.scss file in my application but it says variable not found. 我尝试访问我的应用程序中colors.scss文件中存在的一些变量,但显示未找到变量。 I have to import the colors.scss file again inside my styles.scss file to detect the variable.
我必须再次在我的styles.scss文件中导入colors.scss文件以检测变量。 Is there no way to prevent addition into styles.scss file.
没有办法防止添加到styles.scss文件中。
我使用stylePreprocessorOptions
和指定的内部路径的数组includePaths
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.