【发布时间】:2019-05-25 08:30:50
【问题描述】:
我创建了一个 Angular 库项目,我想在其中使用 SCSS 作为样式。
所以我已经配置好了
ng config schematics.@schematics/angular:component.styleext scss
这使得 angular.json 文件
"schematics": {
"@schematics/angular:component": {
"styleext": "scss"
}
}
现在我在我的库组件中使用materialize-css UI 库。它需要导入它的 SCSS 文件。
我没有看到 styles.scss 文件,我可以在其中导入此文件以及我的组件和其他常见样式?
我尝试创建一个并进入 angular.json
"styles": ["projects/library_name/styles.scss"]
在projects下->library_name->architect->build->options
但这在构建库项目时显示错误
Schema validation failed with the following errors:
Data path "" should NOT have additional properties(styles).
更新
我收到了this,如果有帮助,请解决同样的问题!
【问题讨论】:
标签: angular sass angular-cli