在我的angular.json > projects > landing > architect > built > options
中,我有:
"stylePreprocessorOptions": {
"includePaths": [
"src/theme/mixins"
]
},
这让我以组件的样式导入样式,例如:
@import "breakpoints"; // instead of ../../../../theme/mixins/breakpoints
当我要为server
构建应用程序时,问题就开始了。由于无法将stylePreprocessorOptions
添加到架构师为服务器构建的选项中,因此出现以下错误:
ERROR in Module build failed (from ./node_modules/sass-loader/lib/loader.js):
@import "breakpoints";
^
File to import not found or unreadable: breakpoints.
当我尝试将stylePreprocessorOptions
添加到server
体系结构时,出现以下错误:
Schema validation failed with the following errors:
Data path "['server']" should NOT have additional properties(stylePreprocessorOptions).
Error: Schema validation failed with the following errors:
Data path "['server']" should NOT have additional properties(stylePreprocessorOptions).
在相对更改路径的同时,它可以起作用:
@import "../../../../theme/mixins/breakpoints";
有解决方案吗?