Skip to content

Commit f860106

Browse files
committed
Added UseHarmony parameter to MSBuild task
1 parent efe4b14 commit f860106

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/React.MSBuild/TransformJsx.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,22 @@ public class TransformJsx : Task
3030
[Required]
3131
public string SourceDir { get; set; }
3232

33+
/// <summary>
34+
/// A value indicating if es6 syntax should be rewritten.
35+
/// </summary>
36+
/// <returns><c>true</c> if support for es6 syntax should be rewritten.</returns>
37+
public bool UseHarmony { get; set; }
38+
3339
/// <summary>
3440
/// Executes the task.
3541
/// </summary>
3642
/// <returns><c>true</c> on success</returns>
3743
public override bool Execute()
3844
{
3945
MSBuildHost.EnsureInitialized();
46+
var config = React.AssemblyRegistration.Container.Resolve<IReactSiteConfiguration>();
47+
config.UseHarmony = UseHarmony;
48+
4049
_environment = React.AssemblyRegistration.Container.Resolve<IReactEnvironment>();
4150

4251
Log.LogMessage("Starting TransformJsx");

0 commit comments

Comments
 (0)