Until the NuGet package is fixed according to the other answer above, for now I have finished using the same shell code that I did for the NuGet beta package:
private static IHtmlString JsUnbundled(this HtmlHelper htmlHelper, string bundlePath) { var jsBuilder = new StringBuilder(); foreach (var file in BundleResolver.Current.GetBundleContents(bundlePath)) { var tagBuilder = new TagBuilder("script"); tagBuilder.Attributes["src"] = file.AddCacheKey();
Then I have another HTML helper that checks if it is being debugged, and then uses the above - otherwises uses Scripts.Render .
Obviously, this does not hash the file β it will ALWAYS request the file. But I am not against it, as it is only for debugging.
source share