title: Bundle Config does not work in release mode
body: <p>I have a .NET MVC project. I manage all .css and .js file in my BundleConfig file.
  It's work great in locally debug mode. But when I run this project release mode , 
  make all the JavaScript files with the bundle like;</p>
  
  <pre><code>&lt;script src="/bundles/alljquery?v=UzNlCXfliUxnARi00NzVdOS0lml6av0Kte2hPdkLmLw1"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I saw this line in my DOM but it does not work. For example I write a alert in a function it does not work.</p>
  
  <p>I looked for a sample JavaScript line in the bundle and found it. so it actually loads the file. But I did not see alert or another actions.</p>
  
  <p>This is my RegisterBundles method;</p>
  
  <pre><code>public static void RegisterBundles(BundleCollection bundles)
          {
              #if !DEBUG
                BundleTable.EnableOptimizations = true;
              #endif
              bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                          "~/Scripts/jquery-{version}.js"));
  
              bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                          "~/Scripts/jquery.validate*"));
  
              // Use the development version of Modernizr to develop with and learn from. Then, when you're
              // ready for production, use the build tool at https://modernizr.com to pick only the tests you need.
              bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                          "~/Scripts/modernizr-*"));
  
              bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                        "~/Scripts/bootstrap.js",
                        "~/Scripts/respond.js"));
  
              bundles.Add(new StyleBundle("~/Content/css").Include(
                        "~/Content/bootstrap.css",
                        "~/Content/site.css"));
  
              bundles.Add(new StyleBundle("~/Content/Sitecss").IncludeDirectory("~/Content/css", "*.css",true)); 
  
              bundles.Add(new ScriptBundle("~/bundles/alljquery").IncludeDirectory("~/Content/js", "*.js", true));
  
              var jsFiles = Directory.GetFiles(HttpContext.Current.Server.MapPath("/Content/Pages"), "*.js");
              foreach (var jsFile in jsFiles)
              {
                  var bundleName = Path.GetFileNameWithoutExtension(jsFile);
                  bundles.Add(new ScriptBundle("~/bundles/jsMrT/" + bundleName).Include(
                  "~/Content/pages/" + Path.GetFileName(jsFile)));
              }
  
  
          }
  </code></pre>
  
  <p>I try this ;</p>
  
  <pre><code>BundleTable.EnableOptimizations = true;
  </code></pre>
  
  <p>And I try this;</p>
  
  <pre><code>&lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"&gt;
          &lt;remove name="BundleModule" /&gt;
          &lt;add name="BundleModule" type="System.Web.Optimization.BundleModule" /&gt;
      &lt;/modules&gt;
  &lt;/system.webServer&gt;
  </code></pre>
  
  <p>How can I solved it ?</p>
  
  <p>Thanks.</p>