Jul 31, 2013 at 8:10 PM
Edited Jul 31, 2013 at 8:32 PM
i tried your Bundle feature with my new project but i have a few difficulties to use it. If the content of the CSS file have references to another file, the stylesheets will be broken. If the css files are deeper than the virtualPath that you give to your bundle,
it will return a 404 error. I read somewhere that the files that you bundle must be in the same folder and the virtualPath must be in the same folder too. Well, it seems that it is not really straigthfoward to use the bundle feature. Another thing is to use
the CssRewriteUrlTransform to solve the problem of url references inside stylesheets
cssBundle.Include("~/Content/StyleSheet1.css", new CssRewriteUrlTransform());
but my problem is that i would like to make a transformation for 3 files in the same bundle. This transformation is only for one file! Yes i can use the wildcard but my files are in different folders.
For a few years now, i was using the ScriptRegistrar
from Telerik MVC Extensions product. I never had problems with it. I never had to play with "how deep is my css file". I never had to use transformation because there's url references inside my stylesheets. It was very
easy to use!
So my recommendation would be to open the Telerik ScriptRegistrar source code and check how they do that. Maybe there's something there that would be good for you to implement and make the Bundle more easy to use and solve the problems of referenced url inside
a file and the virtualPath.
the reason i tell you that is because i want to remove my dependency to the Telerik dll since that i'm not using it anymore for the controls. So the Bundles are attractive but not ready for me.
what's your thought?