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.output.cssmodules.md.
Rspeedy logo
Rspeedy
  • 简体中文
  • 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,
        },
      },
    })
    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。