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;

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 许可协议进行许可。