File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
src/System.Web.Optimization.React Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,25 @@ public class JsxBundle : Bundle
23
23
/// </param>
24
24
public JsxBundle ( string virtualPath ) : base ( virtualPath , GetTransforms ( ) )
25
25
{
26
+ base . ConcatenationToken = ";" + Environment . NewLine ;
26
27
}
27
28
29
+ /// <summary>
30
+ /// Applies the transformations.
31
+ /// </summary>
32
+ /// <returns>The bundle response.</returns>
33
+ public override BundleResponse ApplyTransforms ( BundleContext context , string bundleContent , Collections . Generic . IEnumerable < BundleFile > bundleFiles )
34
+ {
35
+ const string pragma = "/** @jsx React.DOM */" ;
36
+
37
+ if ( ! bundleContent . TrimStart ( ) . StartsWith ( pragma ) )
38
+ {
39
+ bundleContent = pragma + bundleContent ;
40
+ }
41
+
42
+ return base . ApplyTransforms ( context , bundleContent , bundleFiles ) ;
43
+ }
44
+
28
45
/// <summary>
29
46
/// Gets the transformations that should be used by the bundle.
30
47
/// </summary>
You can’t perform that action at this time.
0 commit comments