For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/rspeedy/rspeedy.cssloadermodules.auto.md.
Rspeedy logo
Rspeedy
  • English
  • Home > @lynx-js/rspeedy > CssLoaderModules > auto

    CssLoaderModules.auto property

    The auto option allows CSS modules to be automatically enabled based on their filenames.

    Signature:

    auto?: boolean | RegExp | ((filename: string) => boolean) | undefined;

    Default Value

    true

    Remarks

    Given the various auto values, the behavior is described as follows:

    • true: enable CSS modules for all files matching /\.module\.\w+$/i.test(filename) RegExp.

    • false: disable CSS modules.

    • RegExp: enable CSS modules for all files matching the auto.test(filename) RegExp.

    • function: enable CSS modules based on the filter function.

    See css-loader#auto for details.

    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.