Home > @lynx-js/rspeedy > CssLoader

CssLoader interface

The CssLoader controls the options of css-loader.

Signature:

export interface CssLoader

Remarks

The default option is as follow:

const defaultOptions = {
  modules: {
    auto: true,
    namedExport: false,
    exportLocalsConvention: 'camelCase',
    localIdentName: output.cssModules.localIdentName,
  },
  sourceMap: output.sourceMap,
  // importLoaders is `1` when compiling css files, and is `2` when compiling sass/less files
  importLoaders: 1 || 2,
};

Properties

Property Modifiers Type Description
importLoaders? 0 | 1 | 2 | undefined (Optional) The option importLoaders allows you to configure how many loaders before css-loader should be applied to @imported resources and CSS modules imports.
modules? boolean | CssLoaderModules | undefined (Optional) The cssLoader.modules option enables/disables the CSS Modules specification and setup basic behavior.
Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.