Hi, In Module Zero when you append the bundles and implement it in the layout or in the header layout, it doesn't bundle it. It shows all the scripts in seperate files.
For ex: i have a bundle called ~/Bundles/App/libs/js when i include this bundle in layout.cshtml like this @Scripts.Render("~/Bundles/App/libs/js") it doesn't do the job and i get bunch of script files seperately instead of the bundle do i miss sth here? or do we need some configuration to activate the bundling?
4 Answer(s)
-
0
It is like that in debug mode. When you publish your project in release mode, bundling & minification will work properly. This makes debugging scripts easier.
-
0
Hello Halil, if i do BundleTable.EnableOptimizations = true; then it is doing the job otherwise release mode or debugging mode do not make any difference on that. I was expecting the same behavior but it doesn't make any difference, i have fixed that by using the BundleTable.EnableOptimizations
-
0
Hi,
I said "publish your project in release mode". If you just switched to Release mode and run your application in Visual Studio, then again it does not works. You can remove debug="true" from compilation in web.config as an alternative. Note that; These are not specific to AspNet Zero, related to Microsoft.AspNet.Web.Optimization, so you can find more info on the web of you need.
Have a nice day.
-
0
Thank you for the answer, have a nice year also :)