File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,11 @@ export function withReactNativeCSS<
4141 disableTypeScriptGeneration,
4242 typescriptEnvPath,
4343 globalClassNamePolyfill = false ,
44+ logger = defaultLogger ,
4445 } = options || { } ;
4546
47+ const loggerEnabled = "enabled" in logger ? logger . enabled : true ;
48+
4649 if ( disableTypeScriptGeneration !== true ) {
4750 setupTypeScript ( typescriptEnvPath ) ;
4851 }
@@ -211,9 +214,9 @@ export function withReactNativeCSS<
211214 Array . from ( nativeCSSFiles . values ( ) ) . map ( ( [ , value ] ) => value ) ,
212215 ) ;
213216
214- if ( defaultLogger . enabled && fileBuffer ) {
215- defaultLogger ( `Transformed ${ filePath } ` ) ;
216- defaultLogger ( fileBuffer ?. toString ( ) ) ;
217+ if ( loggerEnabled && fileBuffer ) {
218+ logger ( `Transformed ${ filePath } ` ) ;
219+ logger ( fileBuffer ?. toString ( ) ) ;
217220 }
218221 }
219222
You can’t perform that action at this time.
0 commit comments