简体   繁体   English

Angular 7 使用Scss文件

[英]Angular 7 using Scss file

I have a project developed in angular 7.我有一个在 angular 7 开发的项目。

However, to use a library, I need to use a.scss file.但是,要使用库,我需要使用 a.scss 文件。

When running the program I get the following error运行程序时出现以下错误

图片

Does anyone know how I can solve it?有谁知道我该如何解决? Already tried a little of everything and continues to give the same error:(已经尝试了一切并继续给出同样的错误:(

My scss file我的scss文件

@import '~@material/image-list/mdc-image-list';

.masonry-image-list {
  @include mdc-image-list-masonry-columns(3);

  &__item { background-color: #ccc; }
}

Can you provide your webpack config file?你能提供你的 webpack 配置文件吗? Just check the documentation of sass-loader which is about your version.只需检查关于您的版本的 sass-loader 的文档。 You can not use any other versions.您不能使用任何其他版本。 As you can see in the error, there is no option like "includePaths" on the version you are using.正如您在错误中看到的那样,您正在使用的版本上没有像“includePaths”这样的选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM