Running an ASP.NET MVC 4 app in release mode does not bundle and minifiy the js files

后端 未结 4 1282
死守一世寂寞
死守一世寂寞 2021-01-08 00:50

When I run my ASP.NET MVC 4 app in release mode, the bundles are still outputting the unminified and separate js files, instead of bundling and minifying it into fe

4条回答
  •  悲&欢浪女
    2021-01-08 01:28

    1. Nothing is being bundled or minified if debug is set to true in Web.config file so that you can easily debug the output.

    2. If you want to override this, just add the following line of code to your BundleConfig file:

      BundleTable.EnableOptimizations = true;

提交回复
热议问题