ASP.Net Bundling and Minification - No Dots Allowed

If you aren’t bundling and minifying your javascript and CSS files, you should. It can significantly improve the load time of your web application. And if you’re working in ASP.Net, Microsoft helps bundle and minify your files with their Web Optimization tools, available on NuGet.

If you want to learn how to use the ASP.Net Web Optimization tools, read these links:

There is just one extra note I want to add - when creating a bundle, don’t put a ‘.’ in the bundle name, or it will silently fail.

So don’t do this:

1
bundles.Add(new ScriptBundle("~/bundles/myfiles.js.min").Include(...);

Instead, do this:

1
bundles.Add(new ScriptBundle("~/bundles/myfiles").Include(...);