File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
packages/vite/src/node/plugins Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -99,14 +99,9 @@ export interface CSSModulesOptions {
9999 | ( ( name : string , filename : string , css : string ) => string )
100100 hashPrefix ?: string
101101 /**
102- * default: null
102+ * default: undefined
103103 */
104- localsConvention ?:
105- | 'camelCase'
106- | 'camelCaseOnly'
107- | 'dashes'
108- | 'dashesOnly'
109- | null
104+ localsConvention ?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly'
110105}
111106
112107const cssLangs = `\\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)($|\\?)`
@@ -915,8 +910,7 @@ async function compileCSS(
915910 postcssPlugins . unshift (
916911 ( await import ( 'postcss-modules' ) ) . default ( {
917912 ...modulesOptions ,
918- // TODO: convert null to undefined (`null` should be removed from `CSSModulesOptions.localsConvention`)
919- localsConvention : modulesOptions ?. localsConvention ?? undefined ,
913+ localsConvention : modulesOptions ?. localsConvention ,
920914 getJSON (
921915 cssFileName : string ,
922916 _modules : Record < string , string > ,
You can’t perform that action at this time.
0 commit comments