0
私はangular-cli
を使っているプロジェクトを持っています。私はmdc components /を使用しています。個別のコンポーネントのsassファイルをインポートしたいこのため、angular-cliプロジェクトでmdc sassファイルを使用
1)私はstyle.scss
にファイルstyle.css
を改名、このコマンド
ng set defaults.styleExt scss
2)を使用して、デフォルトのstyleExtを変更しました。 angular-cli.json
で
3))は
"styles": [
"styles.scss"
],
4に
"styles": [
"styles.css"
],
を変更パス
"stylePreprocessorOptions": {
"includePaths": [
"node_modules"
]
}
5を含むようにstylePreprocessorOptions
構成を追加した)最後style.scss
ファイルに
@import '[email protected]/button/mdc-button';
が、これは
ERROR in ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader?{"ident":"postcss"}!./~/sass-loader/lib/loader.js?{"sourceMap":false,"precis
ion":8,"includePaths":["D://SK//Study//Material//MaterialWithAngularDemo//src//node_modules"]}!./src/styles.scss
Module build failed:
undefined
^
File to import not found or unreadable: @material/theme/mixins.
Parent style sheet: D:/SK/Study/Material/MaterialWithAngularDemo/node_modules/@material/button/mdc-button.scss
in D:\SK\Study\Material\MaterialWithAngularDemo\node_modules\@material\button\mdc-button.scss (line 17, column 1)
@ ./src/styles.scss 4:14-187
@ multi ./src/styles.scss
を示している、私は何かが足りないのですか?