ASP.NET Bundling and Minification

ReactJS.NET supports the use of Microsoft's ASP.NET Bundling and Minification library to transform JavaScript via Babel, and minify it along with all your other JavaScript. Simply create a BabelBundle containing any number of JSX or regular JavaScript files:

// In BundleConfig.cs
bundles.Add(new BabelBundle("~/bundles/main").Include(
    // Add your JSX files here
    // You can include regular JavaScript files in the bundle too

BabelBundle will compile your JSX to JavaScript and then minify it. For more control (eg. if you want to run other transforms as well), you can use BabelTransform directly:

// In BundleConfig.cs
bundles.Add(new Bundle("~/bundles/main", new IBundleTransform[]
    // This works the same as BabelBundle (transform then minify) but you could
    //add your own transforms as well.
    new BabelTransform(),
    new JsMinify(),