locked
SignalR javascript client with rollup? RRS feed

  • Question

  • User-313099801 posted

    Hi,

    Has anybody successfully packaged up a javascript library with signalr (non-core version)?

    Due to the dependency on jQuery including and packaging is a bit odd.  I've played with the @aspnet/signalr and for the most part it imports as expected, but when trying to use the old version it's not clear to me if I'm going to be better off just treating it as an external...along with jQuery.  So far I've had some luck with including * from jquery then just including jquery.signalR.min.js, but I'm not a big fan of this approach.

    I can provide better examples if I'm not stating this correctly, but please let me know if anybody has any experience with this.

    Thanks!

     Matt

    Friday, January 11, 2019 6:57 AM

All replies

  • User61956409 posted

    Hi Matt,

    Due to the dependency on jQuery including and packaging is a bit odd.  I've played with the @aspnet/signalr and for the most part it imports as expected, but when trying to use the old version it's not clear to me if I'm going to be better off just treating it as an external...along with jQuery.  So far I've had some luck with including * from jquery then just including jquery.signalR.min.js, but I'm not a big fan of this approach.

    ASP.NET SignalR JS library has dependency on jQuery (>= 1.6.4), do you try to just include jQuery (>= 1.6.4) with SignalR JS?

    With Regards,

    Fei Han

    Monday, January 14, 2019 5:32 AM
  • User-313099801 posted

    Hi Fei,

    Thanks for your response.  The rollupjs configuration for getting this all to work with the ES6 imports is really what has me confused, but I think I will probably end up just treating them as "externals" and concatenating the jQuery.min and signalr.min with my js.

    Thanks again

     Matt

    Monday, January 14, 2019 7:27 PM