Home / Type/ CSSModulesOptions Type — vite Architecture

CSSModulesOptions Type — vite Architecture

Architecture documentation for the CSSModulesOptions type/interface in css.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  21bb5195_03dc_a2a3_8319_082675839eeb["CSSModulesOptions"]
  c3eb47df_971b_0616_6c9f_29b3ded72224["css.ts"]
  21bb5195_03dc_a2a3_8319_082675839eeb -->|defined in| c3eb47df_971b_0616_6c9f_29b3ded72224
  style 21bb5195_03dc_a2a3_8319_082675839eeb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/plugins/css.ts lines 167–193

export interface CSSModulesOptions {
  getJSON?: (
    cssFileName: string,
    json: Record<string, string>,
    outputFileName: string,
  ) => void
  scopeBehaviour?: 'global' | 'local'
  globalModulePaths?: RegExp[]
  exportGlobals?: boolean
  generateScopedName?:
    | string
    | ((name: string, filename: string, css: string) => string)
  hashPrefix?: string
  /**
   * default: undefined
   */
  localsConvention?:
    | 'camelCase'
    | 'camelCaseOnly'
    | 'dashes'
    | 'dashesOnly'
    | ((
        originalClassName: string,
        generatedClassName: string,
        inputFile: string,
      ) => string)
}

Frequently Asked Questions

What is the CSSModulesOptions type?
CSSModulesOptions is a type/interface in the vite codebase, defined in packages/vite/src/node/plugins/css.ts.
Where is CSSModulesOptions defined?
CSSModulesOptions is defined in packages/vite/src/node/plugins/css.ts at line 167.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free