Documentation

Customizing bundles

When adding bundles to the BundleCollection you may to customize the created Bundle objects.

The Add methods are overloaded to accept an optional bundle customization delegate.

Here's an example that changes the PageLocation property of the bundles.

public class CassetteConfiguration : IConfiguration<BundleCollection>
{
    public void Configure(BundleCollection bundles)
    {
        bundles.AddPerSubDirectory<ScriptBundle>(
            "Scripts",
            bundle => bundle.PageLocation = "body"
        );
    }
}