{"id":20026,"library":"fast-sass-loader","title":"fast-sass-loader","description":"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.","status":"maintenance","version":"2.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/yibn2008/fast-sass-loader","tags":["javascript","sass-loader","fast"],"install":[{"cmd":"npm install fast-sass-loader","lang":"bash","label":"npm"},{"cmd":"yarn add fast-sass-loader","lang":"bash","label":"yarn"},{"cmd":"pnpm add fast-sass-loader","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"required as peer dependency for loader usage","package":"webpack","optional":false},{"reason":"default dart-sass compiler (peer dep, v1.x)","package":"sass","optional":true}],"imports":[{"note":"CommonJS require works without .default: const loader = require('fast-sass-loader')","wrong":"const FastSassLoader = require('fast-sass-loader').default","symbol":"fast-sass-loader","correct":"import FastSassLoader from 'fast-sass-loader'"}],"quickstart":{"code":"// webpack.config.js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.(scss|sass)$/,\n        use: [\n          'css-loader',\n          {\n            loader: 'fast-sass-loader',\n            options: {\n              includePaths: ['src/styles'],\n              data: '$env: production;'\n            }\n          }\n        ]\n      }\n    ]\n  }\n};","lang":"javascript","description":"Shows a basic webpack config using fast-sass-loader with includePaths and data options, paired with css-loader."},"warnings":[{"fix":"Set options.implementation to require('node-sass') in webpack config, or migrate to dart-sass syntax.","message":"In v2.x, default implementation changed from node-sass to dart-sass (npm sass). Existing projects relying on node-sass may fail.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Switch to sass-loader or disable source map requirement for Sass.","message":"No source map support. If you need source maps for debugging, use sass-loader instead.","severity":"gotcha","affected_versions":"all"},{"fix":"Refer to the fast-sass-loader documentation for supported options; common missing options include 'sourceMap' and 'outputStyle'.","message":"Loader configuration options like 'includePaths' are passed directly to the Sass compiler, not all sass-loader options are supported.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider sass-loader for active support, or fork the project to apply updates.","message":"The package has not been updated since 2020 and may not be compatible with webpack 5+ or latest dart-sass.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install sass --save-dev","cause":"Missing peer dependency 'sass' (or 'node-sass' if configured).","error":"Module not found: Error: Cannot resolve module 'sass'"},{"fix":"Install either: npm install sass --save-dev  OR  npm install node-sass --save-dev","cause":"Neither dart-sass nor node-sass is installed.","error":"Error: fast-sass-loader: no implementation found, you should install 'sass' or 'node-sass' peer dependency"},{"fix":"Upgrade webpack to version 4 or later, or pin fast-sass-loader to version 1.x.","cause":"Using fast-sass-loader with webpack version below 4 (requires getOptions API).","error":"TypeError: this.getOptions is not a function","affected_versions":">=2.0.0"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}