Registry / devops / scss-config-webpack-plugin

scss-config-webpack-plugin

JSON →
library2.0.3jsnpmunverified

A webpack plugin that provides a preset SCSS configuration, including sass-loader, postcss-loader, autoprefixer, and css-loader with source maps and mini-css-extract-plugin support. The current stable version is 2.0.3 (released 2022-09-01). It works with webpack >=4.36.0 and Node.js >=10. It is part of the merkle-open webpack-config-plugins suite. Unlike manual SCSS setups, this plugin aims to reduce boilerplate by pre-configuring common loaders and options. However, it abstracts away configuration details which may lead to conflicts with custom loaders.

npm install scss-config-webpack-plugin
INSTALL
IMPORT
SIG · SCSS-CONFIG-WEBPAC
S
scss-config-webpack-plugin
devopsjavascriptv2.0.3
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.

ScssConfigWebpackPlugin
const ScssConfigWebpackPlugin = require('scss-config-webpack-plugin');
import ScssConfigWebpackPlugin from 'scss-config-webpack-plugin';
CJS only; there is no ESM export. Do not use import syntax.
default
const ScssConfigWebpackPlugin = require('scss-config-webpack-plugin');
const { ScssConfigWebpackPlugin } = require('scss-config-webpack-plugin');
The plugin is exported as a single default export, not a named export.
new
new ScssConfigWebpackPlugin()
new ScssConfigWebpackPlugin.Plugin()
No nested constructor.

Minimal usage: add the plugin to webpack config. Requires webpack >=4.36.0 and Node >=10.

const ScssConfigWebpackPlugin = require('scss-config-webpack-plugin'); module.exports = { plugins: [ new ScssConfigWebpackPlugin() ] };
Debug
Known issues
gotchaThe plugin assumes mini-css-extract-plugin is installed and configured. If not, CSS extraction may fail silently.
fix
Install mini-css-extract-plugin and ensure it's added to both plugins and loaders.
affects: >=1.0.0
gotchaThe plugin overrides the `style` loader; if you have custom CSS loaders before it, they may be ignored or conflict.
fix
Avoid mixing with other SCSS/CSS loaders. Remove any existing sass-loader, css-loader, style-loader configuration.
affects: >=1.0.0
deprecatedThe plugin uses `sass-loader` options that may not be compatible with sass-loader v11+. Specifically, `prependData` was renamed to `additionalData`.
fix
Update to sass-loader >=11 and manually patch the plugin options if needed, or lock sass-loader to v10.
affects: >=2.0.0
gotchaThe plugin assumes Node >=10 and npm >=6; older versions will cause cryptic errors during installation.
fix
Upgrade Node and npm to meet minimum requirements.
affects: >=2.0.0
breakingIn version 1.x, the plugin exported a different internal API. Upgrading from 1.x to 2.x may break custom integrations that directly access plugin properties.
fix
Review changelog and update any internal references to plugin internals.
affects: >=2.0.0 <3.0.0
Errors
Common errors & fixes
Error: Cannot find module 'scss-config-webpack-plugin'
Package not installed or not in node_modules.
fix
Run `npm install scss-config-webpack-plugin --save-dev` (or yarn/dedupe).
TypeError: ScssConfigWebpackPlugin is not a constructor
Importing with ES6 import syntax instead of require.
fix
Use `const ScssConfigWebpackPlugin = require('scss-config-webpack-plugin');`.
Module not found: Error: Cannot resolve 'file' or 'directory' ./scss-config-webpack-plugin
Typo in plugin name or path when using relative require.
fix
Ensure the package name is spelled correctly in the require statement.
ValidationError: Invalid options object. SCSS Config Webpack Plugin has been initialized using an options object that does not match the API schema.
Passing invalid options to the plugin constructor.
fix
Check the plugin documentation for valid options. Common mistake: passing a string instead of an object.
Upgrade
Version history
2.0.3latest on npm
Audit
Dependencies
webpackrequiredpeer dependency required to install
Agent activity
6 hits · last 30 days
node
6
Resources
scss-config-webpack-plugin — npm install scss-config-webpack-plugin · libregistry