我将Laravel与react一起使用,我只想在webpack.mix.js中包含一个scss文件,并且在该文件中我引用所有其他的scss文件
但是我无法使其工作,我已经为它奋斗了好几个小时,但徒劳无功:( 它正在编译,结果几乎是空的css文件
webpack.mix.js:
mix.react("resources/js/index.js", "public/js")
.sass("resources/js/utils/app.scss", "public/css")
.extract();
app.scss:
$primary: #1e2258;
$dark: #555;
$secondary: #999;
@import "~bootstrap/scss/bootstrap";
@import url("https://fonts.googleapis.com/css?family=Farro&display=swap");
@import "../components/layouts/styles/all.scss"; //THIS IS THE FILE !!
body {
width: 100%;
overflow-x: hidden;
font-family: Farro, Verdana, Geneva, Tahoma, sans-serif;
background: linear-gradient(45deg, #ccc, #eee);
}
........
all.scss:
@import "Landing";
@import "about";
@import "./contact.scss";
@import "./nav.scss";
@import "./product-card.scss";
@import "./product.scss";
@import "./scrollTopBtn.scss";
这是混合问题还是我的代码问题?????????? 如果还有其他方法,请告诉我