【问题标题】:How to use Material Components Web sass in MeteorJS如何在 MeteorJS 中使用 Material Components Web sass
【发布时间】:2017-12-21 01:54:27
【问题描述】:

我想在我的流星应用程序中使用material design components for web。不幸的是,当像这样从 npm 包中导入 mdc 时:

@import "{}/node_modules/material-components-web/material-components-web";

我收到以下错误:

While processing files with fourseven:scss (for target web.browser):
/client/stylesheets/Application.scss: Scss compiler error: File to import: @material/animation/mdc-animation not found in
file: {}/node_modules/material-components-web/material-components-web.scss

我猜这是由于 mdc 的结构。 material-components-web.scss 文件导入所有位于 node_modules/@material 中的单个组件,而不是在 node_modules/material-components-web 中。

我正在使用 fourseven:scss 包在我的流星应用程序中编译 sass。

如何解决/修复此问题?

【问题讨论】:

标签: meteor sass material-components


【解决方案1】:

正如我在 github 上的问题中所写:

您需要创建一个 scss-config.json 文件,如下所述:https://github.com/fourseven/meteor-scss#global-include-path

该文件的内容是:

{
  "includePaths": [
    "{}/node_modules/"
  ]
}

【讨论】:

  • 您好,这对我来说根本不起作用,您是否需要做任何额外的步骤?
  • 很久以前我就遇到了这个问题,我已经记不清我是如何进行的了。我认为这是同样的问题:github.com/fourseven/meteor-scss/issues/253 我进行了修复,但由于不再需要它而停止了工作。所以很抱歉,我无法为您提供更多帮助。
猜你喜欢
  • 2018-09-25
  • 2018-06-20
  • 1970-01-01
  • 1970-01-01
  • 2020-12-29
  • 1970-01-01
  • 1970-01-01
  • 2020-08-23
  • 2017-08-28
相关资源
最近更新 更多