use*_*133 3 bootswatch bootstrap-4 angular5
我试图在Angular 5项目中使用Bootswatch主题.我正在使用Bootswatch和Bootstrap版本4.0.0-beta-2.我已经通过npm安装了两个,并使用我的主要styles.scss中常用的angular-cli/webpack约定在styles.scss中导入_variables.scss和_bootswatch.scss.我还将相关主题bootstrap.min.css导入到此文件中,然后将其添加到angular.cli.json中的styles []数组中.
在构建期间,我得到:
@include box-shadow(none);
^
No mixin named box-shadow
Run Code Online (Sandbox Code Playgroud)
和破碎的构建.
小智 10
你正在使用角度4-5.所以npm install bootswatch并style.scss按照描述将相关库附加到文件中.
您没有按顺序包含库.尝试像这样导入它.
@import "../node_modules/bootswatch/dist/materia/variables";
@import "../node_modules/bootstrap/scss/bootstrap";
@import "../node_modules/bootswatch/dist/materia/bootswatch";
@import "../node_modules/bootswatch/dist/materia/bootstrap.min.css";