_Layout.cshtml
<script src="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl("~/desktop-js-bundle")" type="text/javascript"></script>
Global.asax.cs
var desktopJsBundle = new Bundle("~/desktop-js-bundle", new CssMinify());
desktopJsBundle.AddFile("~/scripts/jquery-1.7.1.min.js");
BundleTable.Bundles.Add(desktopJsBundle);
Когда я просматриваю источник на http://localhost:52221/desktop-js-bundle?v=...
, я вижу следующее:
/* Minification failed. Returning unminified contents.
(2,1): run-time error CSS1019: Unexpected token, found '('
(and some other errors like this)
*/
/*! jQuery v.1.7.1 jquery.com | jquery.org/license */
(function(a,b)(function cy(a)....... (the rest of the jquery library. NOTE: starts with that "(")
Что мне не хватает? Разве пакет, предлагаемый в mvc 4, действительно не похож на способ jquery начать с этого "("? Спасибо.
UPDATE!
Я использовал new CssMinify()
вместо new JsMinify()
.