MVC 3 System.Web.Optimization Bundles single file MVC 3 System.Web.Optimization Bundles single file asp.net asp.net

MVC 3 System.Web.Optimization Bundles single file


I think you need to add another bundle to it.

For example:

Bundle myJSBundle = new Bundle("~/combined-scripts/custom/my-page",                                                                typeof(JsMinify));myJSBundle.AddFile("~/Scripts/Custom/MyPage.js");

Then in your page:

<script src="@Url.Content("~/combined-scripts/custom/my-page")"                                                  type="text/javascript"></script>

Reference:- http://www.dotnetexpertguide.com/2011/12/bundling-and-minification-aspnet-mvc4.html

More readings: