webpack安装sass

package.json文件

复制代码
{
  "devDependencies": {
    "sass-loader": "^7.2.0",
    "sass": "^1.22.10",
    "fibers": "^4.0.1"
  }
}

这个不用webpack.config.js

复制代码
module.exports = {
  module: {
    rules: [
      {
        test: /\.s[ac]ss$/i,
        use: [
          'style-loader',
          'css-loader',
          {
            loader: 'sass-loader',
            options: {
              implementation: require('sass'),
              sassOptions: {
                fiber: false,
              },
            },
          },
        ],
      },
    ],
  },
};

https://www.webpackjs.com/loaders/sass-loader#root

相关推荐
wflynn13 小时前
GitHub 今日推荐|Stela:在 PC 上直接启动 macOS 的翻译层
rust·开源·github
aifannihao15 小时前
Rust 1.100 的 DropGuard:用 Python 实测失败回滚与吞异常
python·rust·异常处理·标准库·contextlib
鶴哥只手遮天21 小时前
《rustc 内幕》第 1 章 全景:rustc 编译流水线与 crate 版图
后端·rust·开源
SomeOtherTime2 天前
Rust 闭包语法和原理(AI回答)
开发语言·后端·rust
SomeOtherTime2 天前
Rust集合(AI回答)
开发语言·后端·rust
SomeOtherTime3 天前
Rust 泛型与特性讲解(AI回答)
rust
青川Lapis3 天前
RUST:错误处理 thiserror + anyhow 工程化
rust
SomeOtherTime3 天前
Rust生命周期介绍(AI回答)
开发语言·后端·rust
SomeOtherTime3 天前
Rust所有权(AI回答)
开发语言·后端·rust
SomeOtherTime4 天前
Rust 面向对象介绍(AI回答)
开发语言·python·rust