JavaScript Libraries not published to Windows Azure


So late last year I was having trouble trying to figure out why a web site I’d been writing wasn’t working once published to Windows Azure.  I can’t remember which library it was (JQuery.UI perhaps), but once published I was getting a lot of broken JS calls (“can’t load library”, etc).

After a call with a friend today, he enlightened me about a problem which has been documented over on Stack Overflow – when using bundling with ASP.net (MVC or WebForms).  A release build (or production publish) publishes minified versions (“release mode”), but if a library doesn’t have a minified version, the script is ignored altogether!

The solution would seem to be to create a second copy of the non-minified script and rename it to .min.js.  Let me know if this works (or doesn’t work) for you..

Original source:  (Stack Overflow) http://stackoverflow.com/questions/11980458/bundler-not-including-min-files


About Rob Sanders

IT Professional and TOGAF 9 certified architect with nearly two decades of industry experience, 17 years in commercial software development and 11 years in IT consulting. Check out the "About Rob" page for more information.

Leave a comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>