Skip to content

Commit c9274b4

Browse files
authoredDec 3, 2022
fix: add type for function localsConvention value (#11152)
1 parent 75dbca2 commit c9274b4

File tree

1 file changed

+10
-1
lines changed
  • packages/vite/src/node/plugins

1 file changed

+10
-1
lines changed
 

‎packages/vite/src/node/plugins/css.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,16 @@ export interface CSSModulesOptions {
103103
/**
104104
* default: undefined
105105
*/
106-
localsConvention?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly'
106+
localsConvention?:
107+
| 'camelCase'
108+
| 'camelCaseOnly'
109+
| 'dashes'
110+
| 'dashesOnly'
111+
| ((
112+
originalClassName: string,
113+
generatedClassName: string,
114+
inputFile: string
115+
) => string)
107116
}
108117

109118
const cssModuleRE = new RegExp(`\\.module${CSS_LANGS_RE.source}`)

0 commit comments

Comments
 (0)
Please sign in to comment.