I am trying to use MVC4’s new “bundling and minification”.
For IE conditional comments, I’m still doing it the old way: <!--[if lt IE 9]><link href=.../><![endif]--> or <!--[if lt IE 9]>@Styles.Render("~/foo")<![endif]--> but I don’t seem to get the automatic debug/release handling.
Is there a built-in way to do this? How are others doing this?
EDIT:
Also it would be great to be able to include <noscript> tags inside the rendered output (used for fallbacks).
Until I find a better way, I made an adaptor class called
Bundles, which has the method:There is a similar method for scripts. A view calls them as such:
If there is a better way, I’d appreciate the advice.