I add the following ScriptBundle to the BundleConfig:
bundles.Add(new ScriptBundle("~/bundles/javascript").Include( "~/Scripts/jquery-1.*", "~/Scripts/load-image.min.js", "~/Scripts/bootstrap.*", "~/Scripts/bootstrap-image-gallery.*", "~/Scripts/my.global.js"));
This is the link at the end of my _Layout.cshtml as:
@Scripts.Render("~/bundles/javascript")
When debugging, I notice that the output of this rendering script is:
<script src="/Scripts/jquery-1.8.2.js"></script> <script src="/Scripts/bootstrap.js"></script> <script src="/Scripts/bootstrap-image-gallery.js"></script> <script src="/Scripts/my.global.js"></script>
Note that load-image.min.js script is missing? I want to use the same minified script whether I am debugging or not. In terms of release, the script is contained in the complete JS file.
I assume that he sees the "mines", looking for an undefined version, I can not find it, and then deciding that it is best to ignore it completely. Brilliant. If I create a copy of load-image.min.js, name it load-image.js and then refer to it in the BundleConfig as "load-image. *". I believe that it is included in both configurations, but what's the point of doing it?
I guess something is missing here. I do not have a version without restrictions, and I frankly do not care about it. It is used by my Bootstrap image gallery plugin and nothing else. Any ideas there?
asp.net-mvc razor asp.net-mvc-4 bundle asp.net-optimization
getsetcode
source share