@@ -43,6 +43,10 @@ public class JsxTransformer : IJsxTransformer
4343 /// Hash algorithm for file-based cache
4444 /// </summary>
4545 private readonly IFileCacheHash _fileCacheHash ;
46+ /// <summary>
47+ /// Site-wide configuration
48+ /// </summary>
49+ private readonly IReactSiteConfiguration _config ;
4650
4751 /// <summary>
4852 /// Initializes a new instance of the <see cref="JsxTransformer"/> class.
@@ -51,12 +55,14 @@ public class JsxTransformer : IJsxTransformer
5155 /// <param name="cache">The cache to use for JSX compilation</param>
5256 /// <param name="fileSystem">File system wrapper</param>
5357 /// <param name="fileCacheHash">Hash algorithm for file-based cache</param>
54- public JsxTransformer ( IReactEnvironment environment , ICache cache , IFileSystem fileSystem , IFileCacheHash fileCacheHash )
58+ /// <param name="siteConfig">Site-wide configuration</param>
59+ public JsxTransformer ( IReactEnvironment environment , ICache cache , IFileSystem fileSystem , IFileCacheHash fileCacheHash , IReactSiteConfiguration siteConfig )
5560 {
5661 _environment = environment ;
5762 _cache = cache ;
5863 _fileSystem = fileSystem ;
5964 _fileCacheHash = fileCacheHash ;
65+ _config = siteConfig ;
6066 }
6167
6268 /// <summary>
@@ -135,7 +141,7 @@ public string TransformJsx(string input, bool? useHarmony = null)
135141 var output = _environment . ExecuteWithLargerStackIfRequired < string > (
136142 "ReactNET_transform" ,
137143 input ,
138- useHarmony . HasValue ? useHarmony . Value : _environment . SiteConfiguration . UseHarmony
144+ useHarmony . HasValue ? useHarmony . Value : _config . UseHarmony
139145 ) ;
140146 return output ;
141147 }
0 commit comments