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
2323 /// </param>
2424 public JsxBundle ( string virtualPath ) : base ( virtualPath , GetTransforms ( ) )
2525 {
26+ base . ConcatenationToken = ";" + Environment . NewLine ;
2627 }
2728
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+
2845 /// <summary>
2946 /// Gets the transformations that should be used by the bundle.
3047 /// </summary>
You can’t perform that action at this time.
0 commit comments