Interface: CssLoader
The CssLoader controls the options of css-loader.
Remarks
The default option is as follow:
Properties
importLoaders?
optionalimportLoaders?:0|1|2
The option importLoaders allows you to configure how many loaders before css-loader should be applied to @imported resources and CSS modules imports.
Default Value
1 when compiling CSS files and 2 when compiling Sass or Less files
Remarks
See css-loader#import-loaders for details.
modules?
optionalmodules?:boolean|"local"|"global"|"pure"|"icss"|CssLoaderModules
The cssLoader.modules option enables/disables the CSS Modules specification and setup basic behavior.
Default Value
Enables CSS Modules with automatic *.module.* detection, camelCase exports, namedExport: false, and localIdentName inherited from output.cssModules.localIdentName.
Examples
Using false value to increase performance because we avoid parsing CSS Modules features, it will be useful for developers who use vanilla css or use other technologies.
Using () => true value to enable CSS Modules for all files.
Using object value to enable CSS Modules based-on CssLoaderModules.auto option and setup more configurations about CSS Modules.