gpt4 book ai didi

angular - 我在哪里声明 Angular 8.x 中 SASS 文件的加载路径?

转载 作者:行者123 更新时间:2023-12-05 02:58:14 24 4
gpt4 key购买 nike

根据 docs on SASS ,我应该通过在 config file .angular.cli.json 中添加 stylePreprocessorOptions 来指定加载路径如下所示。

"root": "src",
...
"stylePreprocessorOptions": {
"includePaths": [ "./stylings" ]
}

配置文件有changed its name反复,现在是 angular.json。根据this answer , 新文件不仅有新的语法,还有 new schematics .

我真的不知道把旧配置规范放在新格式的什么地方,也不知道它是否更改了名称或格式。

我现在该怎么做?

最佳答案

示例 angular.json 文件:

"projects": {
"app-name": {
"projectType": "application",
"root": "apps/app-name",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"stylePreprocessorOptions": {
"includePaths": [
"."
]
}
...
}

阅读有关 workspace config 的更多信息.请记住在更改 angular.json 文件后重新启动应用程序。 (即使浏览器在保存时重新加载应用程序,HMR 也不会考虑源目录之外的更改。并且上述文件位于根目录中。)

关于angular - 我在哪里声明 Angular 8.x 中 SASS 文件的加载路径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59157556/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com