npm / sass-loader
sass-loader
What changed in sass-loader 8 to 17, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-20.
22 breaking1 deprecations3 new APIs and options1 performance6 behavior and defaults3 tooling13 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initsass-loader 178 changes
Breaking changes 3
Support for the legacy Sass JS API has been removed.
The minimum supported NodeJS version is now 22.11.0.
Support for node-sass has been removed.
Behavior and default changes 2
Resolves data: resources from the loader's context and reads text/x-sass as the indented syntax.
The api option now defaults to auto, which enables the modern compiler when supported and reuses a long-running compiler across files; otherwise it falls back to the modern API.
Tooling 2
The exports field exposes both ESM and CommonJS builds, allowing ESM consumers to import the loader directly while CommonJS consumers continue to use require.
Types have been added.
Fixes and other changes 1
Removes the BOM from compiled CSS and shifts source maps accordingly, preventing it from breaking a CSS rule when tools move @import at-rules above it.
sass-loader 164 changes
Breaking changes 1
Uses the modern Sass JS API by default for sass and sass-embedded; legacy Sass options may need migration.
Performance 1
Caches filesystem calls for the modern API.
Tooling 1
Updates the peer dependency for @rspack/core v2, allowing sass-loader to declare compatibility with it.
Fixes and other changes 1
Normalizes separators in getPossibleRequests on Windows.
sass-loader 151 changes
Breaking changes 1
sass-loader prefers sass-embedded over sass by default.
sass-loader 142 changes
Breaking changes 2
Support for fibers was removed.
The minimum supported Node.js version is now 14.15.0.
sass-loader 133 changes
Breaking changes 2
The original Sass error is no longer stored in the webpack error.
Sass
@warnat-rules are emitted as webpack warnings by default; use this option to revert the behavior.
Fixes and other changes 1
Importers for the modern API no longer cause a crash.
sass-loader 123 changes
Breaking changes 1
The minimum supported Node.js version is 12.13.0.
Fixes and other changes 2
Fixes a crash in custom importers when using worker threads.
Fixes resolving
_index.import.scssandindex.import.scssin packages.
sass-loader 113 changes
Breaking changes 1
The minimum supported webpack version is now 5.
Deprecations 1
Using ~ in imports is deprecated and can be removed; the loader resolves imports relative to the file first, then tries node_modules.
New APIs and options 1
The loader now supports resolve.byDependency, allowing Sass-specific resolution settings such as custom mainFiles.
sass-loader 101 changes
Fixes and other changes 1
Fixes handling of absolute Windows paths in source maps.
sass-loader 913 changes
Breaking changes 4
Use
additionalDatain place of the removedprependDataoption.The
prependDataoption was removed in favor ofadditionalData.The loader prefers
sass(Dart Sass) by default; migrating to it is strongly recommended.Ignored when the loader's
sourceMapoption istrue.
New APIs and options 2
Resolution supports the
sassproperty in theexportsfield for conditional exports.Custom importers can access the loader context through
this.webpackLoaderContext.
Behavior and default changes 2
Resolution supports
process.cwd()logic by default.Resolution supports the
SASS-PATHenvironment variable by default.
Fixes and other changes 5
Resolution logic for absolute paths and server relative URLs was improved.
Avoids producing different content on different operating systems.
Resolution logic for the
file://scheme was improved.Resolution logic was improved when the
includePathsoption is used.Source maps generation was improved.
sass-loader 811 changes
Breaking changes 7
The functions option can no longer be used as Function; use sassOption as Function instead.
Loader options are now validated.
The minimum required node.js version is 8.9.0.
The data option was renamed to prependData.
Sass options includePaths, importer, and functions must now be configured under sassOptions.
The default sourceMap value now depends on devtool; eval and false values do not enable source map generation.
The minimum required webpack version is 4.36.0.
Behavior and default changes 2
Error handling from node-sass and sass was reworked.
The loader automatically uses the fibers package when possible.
Fixes and other changes 2
Resolution for @import was improved, including support for _index and index files in a directory.
Compatibility with pnp was fixed.