Bundling & minification not applying css & js using Asp.net 4.0 C#

后端 未结 5 558
独厮守ぢ
独厮守ぢ 2021-01-13 15:55

I am new to this concept, this is my first project implementing the optimization concept with (Bundling & minification)

Just i am trying to test with simple js

5条回答
  •  清歌不尽
    2021-01-13 16:21

    Your bundling is working, problem is you css are not working when bundled.

    Change your style sheet bundle name to this:

    bundles.Add(new StyleBundle("~/css/allcss").Include("~/css/master.css"));
    

    This should solve your problem.

    P.S. if you keep your css files in multiple folders, then create a bundle for each folder. You can use the IncludeFolder method to make your job easier.

提交回复
热议问题