Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

@Scripts.Render not working

I've registered bundle in BundleConfig like this: bundles.Add(new ScriptBundle("~/bundles/jqueryupload").Include( "~/Scripts/jquery.upload-1.0.2.min.js"));

And want to render it on the view like this: @Scripts.Render("~/bundles/jqueryupload")

But my sript is not included in the page. Any thoughts? Thanks!

like image 624
Alex Avatar asked Apr 12 '13 10:04

Alex


1 Answers

Do not include minified versions in your bundles:

ScriptBundle("~/bundles/jqueryupload").Include("~/Scripts/jquery.upload-1.0.2.js"))

The whole point of the bundles is that they will take care of minifying and combining your static resources. You shouldn't register a .min.js in your bundles.

like image 61
Darin Dimitrov Avatar answered Oct 16 '22 09:10

Darin Dimitrov