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.output.cssmodules.md.
Rspeedy logo
Rspeedy
  • English
  • Home > @lynx-js/rspeedy > Output > cssModules

    Output.cssModules property

    The CssModules option is used for the customization of CSS Modules configurations.

    Signature:

    cssModules?: CssModules | undefined;

    Default Value

    undefined

    Remarks

    The CSS module is enabled for *.module.css, *.module.scss and *.module.less. Use CssModules.auto to customize the filtering behavior.

    Example 1

    Disable CSS modules:

    import { defineConfig } from '@lynx-js/rspeedy'
    export default defineConfig({
      output: {
        cssModules: {
          auto: false,
        },
      },
    })

    Example 2

    Enable CSS modules for all CSS files:

    import { defineConfig } from '@lynx-js/rspeedy'
    export default defineConfig({
      output: {
        cssModules: {
          auto: () => true,
        },
      },
    })
    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.