For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/rspeedy/rspeedy.tools.cssloader.md.
Rspeedy logo
Rspeedy
  • 简体中文
  • Home > @lynx-js/rspeedy > Tools > cssLoader

    Tools.cssLoader property

    The CssLoader controls the options of css-loader.

    Signature:

    cssLoader?: CssLoader | undefined;

    Default Value

    Uses defaults derived from output.cssModules and output.sourceMap, with importLoaders set to 1 for CSS files and 2 for Sass/Less files.

    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,
    };
    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。