Skip to content

Commit fa7ed58

Browse files
committed
[Cassette] Transform all JavaScript files, not just *.jsx files. Closes #52
1 parent cc01351 commit fa7ed58

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/Cassette.React/JsxBundleProcessor.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
99

10-
using System;
1110
using Cassette.BundleProcessing;
1211
using Cassette.Scripts;
1312
using React;
@@ -35,19 +34,16 @@ public JsxBundleProcessor(CassetteSettings settings, IReactEnvironment environme
3534
}
3635

3736
/// <summary>
38-
/// Processes the specified bundle. Adds a <see cref="JsxCompiler"/> for all .jsx files.
37+
/// Processes the specified bundle. Adds a <see cref="JsxCompiler"/> for all files.
3938
/// </summary>
4039
/// <param name="bundle">The bundle.</param>
4140
public void Process(ScriptBundle bundle)
4241
{
4342
foreach (var asset in bundle.Assets)
4443
{
45-
if (asset.Path.EndsWith(".jsx", StringComparison.InvariantCultureIgnoreCase))
46-
{
47-
asset.AddAssetTransformer(
48-
new CompileAsset(new JsxCompiler(_environment), _settings.SourceDirectory)
49-
);
50-
}
44+
asset.AddAssetTransformer(
45+
new CompileAsset(new JsxCompiler(_environment), _settings.SourceDirectory)
46+
);
5147
}
5248
}
5349
}

0 commit comments

Comments
 (0)