dfrencham / ms-signalr-client

Unofficial package for the Microsoft SignalR client. Intented for comsumption with jspm.
21 stars 16 forks source link

It is possible to use this package with webpack? #14

Closed ClaudioNunes closed 6 years ago

gregveres commented 6 years ago

HI @ClaudioNunes

I don't know the definitive answer, but I just tried it today and I am getting $.hubConnection is not a function. So I am assuming that means it is not a module and therefore can't be loaded with a module loader like webpack.

Yea, I just looked at the source and it is not wrapped in any sort of module header. So its off to find another npm package.

Given that it has been a couple months since you asked the question, did you find another npm signalR package to use that is usable with webpack?

dfrencham commented 6 years ago

Sorry for the late reply. This package is simply the official Microsoft Signal-R package, with minimal changes for npm packaging.

It may be possible to use it with webpack as discussed here: https://stackoverflow.com/questions/40030002/how-to-load-signalr-js-in-webpack-inside-angular-2

gregveres commented 6 years ago

Thanks. I picked signalr-amd because it has the amd wrapper and can be used directly without any additional config changes. I did see that SO answer and decided to go the amd route.