Registry / devops / fast-sass-loader

fast-sass-loader

JSON →
library2.0.1jsnpmunverified

A webpack loader for Sass/SCSS that claims 5-10x faster compilation than sass-loader by deduplicating @imports, merging all Sass files into a single compile unit, and caching results internally. Version 2.x switched from node-sass to dart-sass (npm 'sass') as the default compiler, with an `implementation` option to restore node-sass. It also provides built-in url() resolution, eliminating the need for resolve-url-loader. Key trade-offs include no source map support and limited loader configuration compared to sass-loader. Release cadence is low; last update was 2020. Requires webpack 1–5 and sass 1.x as peer dependencies.

npm install fast-sass-loader
INSTALL
IMPORT
SIG · FAST-SASS-LOADER
F
fast-sass-loader
devopsjavascriptv2.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fast-sass-loader
import FastSassLoader from 'fast-sass-loader'
const FastSassLoader = require('fast-sass-loader').default
CommonJS require works without .default: const loader = require('fast-sass-loader')

Shows a basic webpack config using fast-sass-loader with includePaths and data options, paired with css-loader.

// webpack.config.js module.exports = { module: { rules: [ { test: /\.(scss|sass)$/, use: [ 'css-loader', { loader: 'fast-sass-loader', options: { includePaths: ['src/styles'], data: '$env: production;' } } ] } ] } };
Debug
Known issues
breakingIn v2.x, default implementation changed from node-sass to dart-sass (npm sass). Existing projects relying on node-sass may fail.
fix
Set options.implementation to require('node-sass') in webpack config, or migrate to dart-sass syntax.
affects: >=2.0.0
gotchaNo source map support. If you need source maps for debugging, use sass-loader instead.
fix
Switch to sass-loader or disable source map requirement for Sass.
affects: all
gotchaLoader configuration options like 'includePaths' are passed directly to the Sass compiler, not all sass-loader options are supported.
fix
Refer to the fast-sass-loader documentation for supported options; common missing options include 'sourceMap' and 'outputStyle'.
affects: all
deprecatedThe package has not been updated since 2020 and may not be compatible with webpack 5+ or latest dart-sass.
fix
Consider sass-loader for active support, or fork the project to apply updates.
affects: >=2.0.0
Errors
Common errors & fixes
Module not found: Error: Cannot resolve module 'sass'
Missing peer dependency 'sass' (or 'node-sass' if configured).
fix
npm install sass --save-dev
Error: fast-sass-loader: no implementation found, you should install 'sass' or 'node-sass' peer dependency
Neither dart-sass nor node-sass is installed.
fix
Install either: npm install sass --save-dev  OR  npm install node-sass --save-dev
TypeError: this.getOptions is not a function
Using fast-sass-loader with webpack version below 4 (requires getOptions API).
fix
Upgrade webpack to version 4 or later, or pin fast-sass-loader to version 1.x.
Upgrade
Version history
2.0.1latest on npm
Audit
Dependencies
webpackrequiredrequired as peer dependency for loader usage
sassoptionaldefault dart-sass compiler (peer dep, v1.x)
Agent activity
2 hits · last 30 days
node
2
Resources
fast-sass-loader — npm install fast-sass-loader · libregistry