jquery - MVC 4 BundleConfig not creating script references -


i'm adding few jquery script files app using bundleconfig.cs class.

bundles.add(new scriptbundle("~/bundles/jquery").include(                     "~/scripts/jquery-{version}.js",                     "~/scripts/jquery-ui-{version}.js",                     "~/scripts/jquery.mcustomscrollbar.min.js",                     "~/scripts/jquery.mousewheel.min.js",                     "~/scripts/jtable/jquery.jtable.js")); 

when run app , check page source, of script files referenced:

<script src="/scripts/jquery-1.10.2.js"></script> <script src="/scripts/jquery-ui-1.10.3.js"></script> <script src="/scripts/jtable/jquery.jtable.js"></script> <script src="/scripts/jquery-migrate-1.2.1.min.js"></script> 

why happening? can work around issue manually adding script references directly _layout.cshtml, hardly best practice.

the .min part handled mvc - automatically include .js files debug mode , .min.js files release mode.

just download unminified version of jquery.mcustomscrollbar.min.js , put in scripts directory, reference as: jquery.mcustomscrollbar.js

bundles.add(new scriptbundle("~/bundles/jquery").include(                     "~/scripts/jquery-{version}.js",                     "~/scripts/jquery-ui-{version}.js",                     "~/scripts/jquery.mcustomscrollbar.js",                     "~/scripts/jquery.mousewheel.js",                     "~/scripts/jtable/jquery.jtable.js")); 

mvc load appropriate script debug/release


Comments