I use signalr in my application and refer to it like this:
<script src="/signalr/hubs" type="text/javascript"></script>
Of course, signalr is dynamically generated by javascript on the fly. When I run yslow to improve the performance of my web application, it complains that singalr / hubs is not minimized. Of course, when I click on the link, it shows a js sample, a small fragment:
/*! * ASP.NET SignalR JavaScript Library v2.1.1 * http://signalr.net/ * * Copyright Microsoft Open Technologies, Inc. All rights reserved. * Licensed under the Apache 2.0 * https://github.com/SignalR/SignalR/blob/master/LICENSE.md * */ /// <reference path="..\..\SignalR.Client.JS\Scripts\jquery-1.6.4.js" /> /// <reference path="jquery.signalR.js" /> (function ($, window, undefined) { /// <param name="$" type="jQuery" /> "use strict"; if (typeof ($.signalR) !== "function") { throw new Error("SignalR: SignalR is not loaded. Please ensure jquery.signalR-x.js is referenced before ~/signalr/js."); } var signalR = $.signalR; function makeProxyCallback(hub, callback) { return function () { // Call the client hub method callback.apply(hub, $.makeArray(arguments)); }; } function registerHubProxies(instance, shouldSubscribe) { var key, hub, memberKey, memberValue, subscriptionMethod;
How can I minimize this file if it is generated automatically?
Edit
Let me also clarify that I use lcsk , which can be found here , which uses signalr. This package has a startup.cs file that looks like this:
using Microsoft.Owin; using Owin; [assembly: OwinStartup(typeof(RIMS.LCSK.Startup))] namespace RIMS.LCSK { public class Startup { public void Configuration(IAppBuilder app) { app.MapSignalR(); } } }
Do I need to say something to get this settled? I saw this:
SignalR hub.js minify (but this is similar to using the global.asax file) And I also saw this:
https://github.com/SignalR/SignalR/issues/2403
But I donβt know where I need to make any of this with what I have.