File tree 1 file changed +3
-9
lines changed
packages/vite/src/node/plugins
1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -99,14 +99,9 @@ export interface CSSModulesOptions {
99
99
| ( ( name : string , filename : string , css : string ) => string )
100
100
hashPrefix ?: string
101
101
/**
102
- * default: null
102
+ * default: undefined
103
103
*/
104
- localsConvention ?:
105
- | 'camelCase'
106
- | 'camelCaseOnly'
107
- | 'dashes'
108
- | 'dashesOnly'
109
- | null
104
+ localsConvention ?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly'
110
105
}
111
106
112
107
const cssLangs = `\\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)($|\\?)`
@@ -915,8 +910,7 @@ async function compileCSS(
915
910
postcssPlugins . unshift (
916
911
( await import ( 'postcss-modules' ) ) . default ( {
917
912
...modulesOptions ,
918
- // TODO: convert null to undefined (`null` should be removed from `CSSModulesOptions.localsConvention`)
919
- localsConvention : modulesOptions ?. localsConvention ?? undefined ,
913
+ localsConvention : modulesOptions ?. localsConvention ,
920
914
getJSON (
921
915
cssFileName : string ,
922
916
_modules : Record < string , string > ,
You can’t perform that action at this time.
0 commit comments