如何在MeteorJS中使用Material Components Web sass

时间:2017-07-16 12:48:02

标签: meteor sass material-components

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

$model->image = UploadedFile::getInstance($model, 'image');
if ($model->upload()) {
    // do some stuff with file
}

我收到以下错误:

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

我想这是由于mdc的结构。 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 文件会导入位于material-components-web.scss内但不在node_modules/@material内的所有单个组件。

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

如何解决/解决此问题?

1 个答案:

答案 0 :(得分:1)

As I wrote in your issue on github:

You need to create a scss-config.json file as described here: https://github.com/fourseven/meteor-scss#global-include-path

The content of that file would be:

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