NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2011 most downloaded on npm
Sass loader for webpack
Last release 1 months ago
30 Aug 2026
Release timing varies
gaps range from 2 weeks to 8 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
13 years old
115 releases · first in 2014
Remove the byte order mark (BOM) from the compiled CSS. dart-sass prepends it when the compiled CSS contains non ASCII characters and the style option
dart-sass prepends it when the compiled CSS contains non ASCII characters and the style option is compressed (the default for the production mode), but a BOM is only valid at the very beginning of a file - tools like css-loader move @import at-rules above it, so it ended up in the middle of the generated CSS and broke the rule after it. Source maps are shifted accordingly. (by @alexander-akait in #1337)Add "auto" to the api option and make it the default. When the Sass implementation supports the modern compiler, "auto" enables it and reuses a single
Add "auto" to the api option and make it the default. When the Sass implementation supports the modern compiler, "auto" enables it and reuses a single long-running compiler across files, which significantly improves build performance; otherwise it falls back to the modern API. (by @alexander-akait in #1319)
Remove node-sass support. (by @alexander-akait in #1316)
Minimum supported NodeJS version is 22.11.0. (by @alexander-akait in #1318)
Convert source to native ECMAScript modules. The package now declares "type": "module" and exposes both an ESM and a CommonJS build via the exports field. CommonJS consumers continue to work via require, and ESM consumers can now import the loader directly. (by @alexander-akait in #1322)
Remove legacy Sass JS API support. (by @alexander-akait in #1316)
All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
One column per quarter.
Add "auto" to the api option and make it the default. When the Sass implementation supports the modern compiler, "auto" enables it and reuses a single long-running compiler across files, which significantly improves build performance; otherwise it falls back to the modern API. (by @alexander-akait in #1319)
Remove node-sass support. (by @alexander-akait in #1316)
Minimum supported NodeJS version is 22.11.0. (by @alexander-akait in #1318)
Convert source to native ECMAScript modules. The package now declares "type": "module" and exposes both an ESM and a CommonJS build via the exports field. CommonJS consumers continue to work via require, and ESM consumers can now import the loader directly. (by @alexander-akait in #1322)
Remove legacy Sass JS API support. (by @alexander-akait in #1316)
All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
normalize separators in getPossibleRequests for Windows
update peer dependency for @rspack/core v2
Bug Fixes cache fs calls for modern API
allow to import CSS using @use with css extension
include sources map сontent for modern api by default
modern-compiler: dispose redundant compilers
16.0.2 (2024-09-20) Bug Fixes error message from sass
generate correct sourceMaps for modern-compiler api
use modern Sass JS API by default for sass and sass-embedded
sass and sass-embedded[!WARNING]
The sass options are different for the
legacy(before) andmodernAPIs. Please look at docs how to migrate to the modern options. Legacy options - https://sass-lang.com/documentation/js-api/interfaces/legacystringoptions/ Modern options - https://sass-lang.com/documentation/js-api/interfaces/options/
To return to the previous logic use:
module.exports = {
module: {
rules: [
{
test: /\.s[ac]ss$/i,
use: [
"style-loader",
"css-loader",
{
loader: "sass-loader",
options: {
api: "legacy",
// Your options
},
},
],
},
],
},
};
sass and sass-embedded (10be1ba)prefer sass-embedded over sass by default
avoid multiple sass compiler creation
added the modern-compiler value for API to reuse compiler process
modern-compiler value for API to reuse compiler process (#1195) (cef40a8)modern and modern-compiler API (#1197) (2265b72)Notes:
Using the modern-compiler value for the api option together with sass-embedded reduces compilation time by 5-10 times, especially for projects using large files with a lot of @import/@use, for small files the build time reduction will not be significant.
modern-compiler value for API to reuse compiler process (#1195) (cef40a8)modern and modern-compiler API (#1197) (2265b72)Notes:
Using the modern-compiler value for the api option together with sass-embedded reduces compilation time by 5-10 times, especially for projects using large files with a lot of @import/@use, for small files the build time reduction will not be significant.
### 14.1.1 (2024-02-19) ### Bug Fixes * handle pkg: scheme
add @rspack/core as an optional peer dependency
minimum supported Node.js version is 18.12.0
fibers support18.12.0 (627f55d)sass embedded importer detection
perf: avoid using klona for sass options
## 13.3.0 (2023-05-22) ### Features * add support for node-sass v9
### 13.2.2 (2023-03-27) ### Bug Fixes * fix dependencies in modern API
do not crash on a custom scheme in @import/@use for the modern API
## 13.2.0 (2022-11-09) ### Features * add support for node-sass v8
## 13.1.0 (2022-10-06) ### Features * allow to extend conditionNames
hide error stacktrace on Sass errors
optimize debug message formatting, #1065
minimum supported Node.js version is 14.15.0
Node.js version is 14.15.0 (#1048)@warn at-rules as webpack warnings by default, if you want to revert behavior please use the warnRuleAsWarning option (#1054) (58ffb68)added support for automatic loading of sass-embedded
added support for sass-embedded (faster than node-sass), feel free to feedback
## 12.4.0 (2021-12-07) ### Features * add support for node-sass 7
added the warnRuleAsWarning option, allows to emit a warning on the @warn rule
## 12.2.0 (2021-10-12) ### Features * add link field in schema
allow String value for the implementation option
minimum supported Node.js version is 12.13.0
disabled auto importing fiber on node >= 16 due incompatibility problems
## 11.1.0 (2021-05-10) ### Features * support node-sass v6.0.0
compatibility with custom importers for node-sass
using ~ is deprecated and can be removed from your code (we recommend it), but we still support it for historical reasons.
~ is deprecated and can be removed from your code (we recommend it), but we still support it for historical reasons.Why you can removed it?
The loader will first try to resolve @import/@use as relative, if it cannot be resolved, the loader will try to resolve @import/@use inside node_modules.
Using ~ means looking for files in node_modules or resolve.alias or resolve.fallback.
webpack version is 5resolve.byDependency option, you can setup { resolve: { byDependency: { sass: { mainFiles: ['custom', '...'] } } } }### 10.5.2 (2024-01-04) ### Bug Fixes * compatibility with node-sass@9
missing sass embedded check when get default implementation
### 10.4.1 (2022-11-15) ### Bug Fixes * support node-sass v8
## 10.4.0 (2022-11-15) ### Features * support node-sass v8
### 10.3.1 (2022-07-06) ### Bug Fixes * fix support for node-sass 7
## 10.3.0 (2022-06-27) ### Features * add support for node-sass 7
backported disabled auto importing fiber on node >= 16
## 10.2.0 (2021-05-10) ### Features * support node-sass v6
problem with resolving and the includePaths option
allow the additionalData to be async
### 10.0.5 (2020-11-02) ### Bug Fixes * support node-sass v5.0.0
compatibility with the filesystem cache
### 10.0.3 (2020-10-09) ### Chore * update schema-utils
### 10.0.2 (2020-09-03) ### Bug Fixes * source maps generation
### 10.0.1 (2020-08-25) ### Chore * update deps
handle absolute windows path in source maps
See notes for https://github.com/webpack-contrib/sass-loader/releases/tag/v10.0.0-rc.0 release
loader generates absolute sources in source maps, also avoids modifying sass source maps if the sourceMap option is false
sources in source maps, also avoids modifying sass source maps if the sourceMap option is falsesources in source maps, also avoids modifying sass source maps if the sourceMap option is false### 9.0.3 (2020-08-05) ### Bug Fixes * resolution algorithm
resolution algorithm for node-sass
### 9.0.1 (2020-07-03) ### Bug Fixes * do not crash on errors
Your coding agent can read these notes before it upgrades. Set up the MCP server →