Stylelint loader for Webpack 4

Usage no npm install needed!

<script type="module">
  import sdvgStylelintLoader from 'https://cdn.skypack.dev/@sdvg/stylelint-loader';


Webpack Stylelint loader

Stylelint loader for Webpack 4.


$ npm install -D @sdvg/stylelint-loader

You also need to install Stylelint and provide a config:

$ npm install -D stylelint

Add as first loader (last in Array) for your styles like this:

    test: /\.css$/,
    use: [
        loader: '@sdvg/stylelint-loader',
        options: {


Option Default Description
quiet false Suppress Stylelint output
emitError false Emit all warnings and errors as errors (recommended for production builds)
emitWarning false Emit all warnings and errors as warnings (recommended when using Hot Module Reloading)

By default Stylelint warnings are emitted as warnings and Stylelint errors as errors.

The following options are passed directly to Stylelint:


MIT License