Open cankoluman opened 10 years ago
Corrected from the above:
bundle =>
{
((CdnScriptBundle)bundle).GzipScriptBundle(isDebuggingEnabled : bool, gzipInDebug : bool default false);
}
I have a post on how to handle CDNs in production for local assets as well, using a CdnUrlModifier.http://kamranicus.com/blog/2015/10/10/azure-cdn-cassette/
It would be great to get this into the main distribution. I based the changes on the comments in the mailing list. Inherits from 'External Bundles' with local assets and generates CDN url prefixed urls for bundles, adds ability to pre-compress (gzip) a bundle, and rewrites URLs in css files assuming a mirrored deployment of assets to the CDN / S3 cloud. In debug mode, continues to use local assets.
Right now, the changes exist inside the main Cassette distribution - on account of 'internal' scoped items and to reduce code duplication. If internal scoped items are made public, then this could be moved into a separate project.
Usage example:
Cheers.