Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个非常简单的 webpack 项目,现在我还想使用bulma一个 css 框架。
我通过安装软件包npm i bulma并尝试app.js使用以下代码将其包含在我的 -file 中,但未成功:
npm i bulma
app.js
import bulma from '~bulma/bulma.sass';
我还尝试使用特定的 sass 部分,但也没有用:
import bulma from '~bulma/sass/base/_all';
您能帮我完成这项工作,或者指出我正确的方向吗?
您需要更新您的 webpack 配置文件,以便 sass 加载程序也处理sass文件,而不仅仅是scss文件。 更改此行 test: /\.scss$/,:test: /\.(sass|scss)$/
sass
scss
test: /\.scss$/,
test: /\.(sass|scss)$/